Redirecting SQL select query output to HTML file - shell script, spool

This post main aim is to redirect the SQL select query output to a file for example to make a simple HTML file to display the select query output.
In this example I created two sample files one is and another one is
File 1:
bash-3.00# cat
sqlplus PV_ADMIN/PV@PV<< EOF

File 2 :
bash-3.00# cat select.sql
set linesize 200
set pages 1000
set feedback off
set markup html on spool on
spool test.html
select * from PV_REPORT.AGINFO;
spool off;
so when I run the it simply calls to spool the output to a test.html which will contain the select of the required SQL query.

Another simple file 
bash-3.00# cat
# This script will make connection to Proviso DB
# and selects the data required from a particular
# table to populate it in a file and uploads to
# your target server
NOW=`(date +"%b-%d-%y")`
echo $NOW
echo "$0 Running on $NOW"
su - oracle  <

sqlplus PV_ADMIN/PV@PV
set wrap off
spool $LOGFILE
select * from PV_REPORT.AGINFO;
sppol off


Read more

Indian government services online

Kindly save it...... All government office related links are available....
This section provides you with information and useful links to avail various Citizen Services being provided by the Central & State/UT Governments in India. The list, however, is not exhaustive, as they are committed to adding more and more information about other services for which citizens and other stakeholders need to interact with the Government. Hope this is helpful for you...


*   Birth Certificate <>
*   Caste Certificate <>
*   Tribe Certificate <>
*   Domicile Certificate <>
*   Driving Licence <>
*   Marriage Certificate <>
*   Death Certificate <>
*   Search More - How do I <>

Apply for:

*   PAN Card <>
*   TAN Card <>
*   Ration Card <>
*   Passport <>
*   Inclusion of name in the Electoral Rolls <>
*   Search More - How do I <>


*   Land/Property <>
*   Vehicle <>
*   With State Employment Exchange <>
*   As Employer <>
*   Company <>
*   .IN Domain <>
*   GOV.IN Domain <>
*   Search More - How do I <>


*   Waiting list status for Central Government Housing <>

*   Status of Stolen Vehicles <>
*   Land Records <>
*   Causelist of Indian Courts <>
*   Court Judgements (JUDIS ) <>
*   Daily Court Orders/Case Status <>
*   Acts of Indian Parliament <>
*   Exam Results <>
*   Speed Post Status <>
*   Agricultural Market Prices Online <>
*   Search More - How do I <>


*   Train Tickets Online <>
*   Air Tickets Online <>
*   Income Tax Returns <>
*   Complaint with Central Vigilance Commission (CVC) <>

*   Search More - How do I <>

Contribute to:

*   Prime Minister's Relief Fund <>
*   Search More - How do I <>


*   Send Letters Electronically <>
*   Search More - How do I <>  

Recently Added Online Services:

*   Tamil Nadu: Online application of marriage certificate for persons having registered their marriages <>
*   Tamil Nadu: Online District wise soil Details of Tamil Nadu <>
*   Tamil Nadu: View Water shed Atlas of Tamil Nadu <>
*   Tamil Nadu: E-Pension District Treasury Tirunelveli <>

*   Meghalaya: Search Electoral Roll Online by Name (2008) <>
*   Meghalaya: Search Electoral Roll Online by EPIC number (2008) <>
*   Meghalaya: Search Electoral Roll Online by House number (2008) <>
*   Meghalaya: Search Electoral Roll Online by Part number (2008) <>

*   Himachal Pradesh: Revised Pay and Arrears Calculator-Fifth Pay <>

*   Andhra Pradesh: Online Motor Driving School Information <>

Global Navigation:

*   Citizens <>
*   Business (External website that opens in a new window) <>
*   Overseas <>
*   Government <>
*   Know India <>
*   Sectors <>
*   Directories <>
*   Documents <>
*   Forms <>
*   Acts <>
*   Rules <>
*   Schemes <>
*   Tenders <>
*   Home <>
*   About the Portal <>
*   Site Map <>
*   Link to Us <>
*   Suggest to a Friend <>
*   Help <>
*   Terms of Use <>
*   Feedback <>
*   Contact Us <>
*   Accessibility Statement <>

Read more

shell script to upload/ftp files to remote machine automatically

Shell script to upload files using FTP from one machine to remote machine automatically

The below simple shell script will automate the FTP steps, to upload file(s) from one machine to other easily ...
edit it according to ur convinece ..

nc184120:/opt/builds # cat


ftp -i -n $HOST <<kris
user ${USER} ${PASSWD}

cd /opt
put cds_db2_admin.sql

nc184120:/opt/builds # ./
Connected to
220-FTP Server (user '')
230-230 User root logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
200 Type set to I.
250 CWD command successful.
local: cds_db2_admin.sql remote: cds_db2_admin.sql
229 Entering Extended Passive Mode (|||64693|)
150 Opening BINARY mode data connection for cds_db2_admin.sql.
100% |**************************************************************************************************************************************|  1101       6.73 MB/s    00:00 ETA
226 Transfer complete.
1101 bytes sent in 00:00 (4.48 KB/s)
221-You have transferred 1101 bytes in 1 files.
221-Total traffic for this session was 1601 bytes in 1 transfers.
221-Thank you for using the FTP service on virgo.
221 Goodbye.

Read more

Rational purify coverage for J2EE application deployed in Websphere

Code coverage for J2EE applications deployed in Websphere using Rational Purify plus

Rational's purify plus is one of the best code coverage tool I have seen till today, It has multiple capabilities in which I got a chance to work with is code coverage capability. Some times it is required for Developers and testers to know what part of the code is not getting executed, which part is getting executed during specific scenario of usage etc. In this case it is always good to use a code coverage too like purify plus to monitor our application while running and analyze the results of code run.  The general process of code coverage is simple for any normal java applications, but when comes to a J2EE applications deployed and running under Websphere application server as a service needs more settings and configurations. In the web we can find many documents for configuring simple Java applications and other for code coverage.

So this post main aim is to explain the steps to configure the code coverage for J2EE application deployed under websphere and running as a system service.

Environment description : 
 Operating system : Windows XP / 2003
 Webserver / Applicaiton server : Websphere
 Application : J2EE type
Running as : Windows service.

Collect data by changing the WAS configuration file
When the Java process for hosting WAS is initialized, it gets its command line options from the server configuration file. This file exists for every WAS node and every WAS server. The location and name of this file is defined as follows:
<WAS root>\profiles\<your active profile>\config\cells\< cell id>\nodes\<node id>\servers\<server name>\server.xml

For example, if WAS is installed in C:\WAS, the profile name is ‘MyProfile’, the cell id is ‘MyCellId’, the node id is ‘MyNodeId’, and the server name is ‘MyServer’. The configuration file path will be defined like this:


Ex :
C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\config\cells\ibm-b51282f6ec3Node01Cell\nodes\ibm-b51282f6ec3Node01\servers\CDSServer

For example:
<jvmEntries xmi:id="JavaVirtualMachine_1284026476671" verboseModeClass="false" verboseModeGarbageCollection="false" verboseModeJNI="false" runHProf="false" debugMode="false" debugArgs="-Djava.compiler=NONE -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=7777" genericJvmArguments="-DPD_DT_ENABLED=true -XrunPureJVMPI:Coverage" executableJarFileName="-Xbootclasspath/a:%PPLUS_HOME%\Rational.jar" disableJIT="false">

The best way to change the profile is to use the WAS administrative console. However, if you do not have access to the console or do not have sufficient rights to edit the server configuration, you may edit the XML file directly. You should locate the jvmEntries element in this file and change the appropriate VM options by adding the JVMPI loading option: -XrunPureJVMPI:

After saving the file or applying these changes from the administrative console you should restart the server process. After the new instance of WAS starts, it will run with the appropriate profiler attached.

So to do the code coverage for any J2EE applications deployed under web sphere and WAS server is running as a system service. So if we edit prefilters in the default settings, this is not going to have any effect on the running service. This is because PureCoverage is saving the default settings in the folder named "c:\documents and settings\\application     data\rational\purecoverage\coverage.ini"                               
Whereas WAS running as a service is using the configuration file named "c:\documents and settings\localservice\application                    
In other words, the service profile doesn't correspond to the          
PureCoverage profile, therefore they are trying to access different    
default INI files.                                                     

There are several ways to work around this problem:                    
1. Edit prefilters in the application settings, not the default        
2. Copy the coverage.ini file from your profile to the service profile 
(see above)                                                            
3. Run WAS as a user process, not as a system service.(User should be same the user with which purify was run)                  
4. Change the user associated with the service to be the same as the one
running the coverage.                                                  
5. Manually edit the coverage.ini file in the local service profile. 

so the best I followed after changing the server.xml file is 3rd one , run you websphere service as the user with which purify coverage was run ... 
Go to Windows 
Start > Run > services.msc > Locate your service ex  : 
IBM WebSphere Application Server V6.1 - CDSServer
> Right click on it > Properties > go to Log on Tab > Select This Account > Provide the user and passwords which is same as the user which is running Purify coverage. > Apply > Ok. 
  • Now launch the Purify coverage once. 
  • Empty coverage window opens up ... 
  • Then now re-strat the Websphere service. 
Now coverage should automatically pick up the chnages and pick the classed which you want to instrument.

How to apply filters in Purify plus / coverage : 
License issues in the Purify plus :

Read more

Vinayaka chavithi and Ramzan / Ramadan Wishes

Today is really a special day I felt the country like India which follows "Unity in diversity" with perfect mix of Hindus and Muslims celebrating the same day as "Ganesh Chaturthi" and "Ramzan" festivals.

I wish you all Indians happy Ramzan and Ganesh chaturthi...
Here are few useful things for this special day ...
Vinayaka Chavithi Vratha Kalpam PDF and MP3 Downloads
Vinayaka Chavithi Vratha Kalpam(PDF Format)
Vinayaka Chavithi Vratha Kalpam(PDF Format)
Vinayaka Chavithi Vratha Kalpam - part1(MP3 Format)
Vinayaka Chavithi Vratha Kalpam - part2(MP3 Format)
Kanipakam Ganesh Special Coverage

వినాయక చవితి శుభాకాంక్షలు

More downloads from Eeenadu site click this ... 

Read more



Yes you herd it right !! ETV D5 * JODI is ready and launched ...It is on air already..
Missed to see launch episodes of it are they for you ..Enjoy. BTW in this episode you can see D4 Winners announcement too ... 
UdayaBhanu is still continued to be the anchor for the show but this time JODI special judges are different , Rekha and Prakash. 
D1 - Prabhu Deva
D2 - Jr. NTR
D3 - Allu Arjun
D4 - Shreya 
Finals were pranced by most famous celebrities of the Telugu industry till today ...let's see who is going to be the brand ambassador for this D5 - JODI special.
Some of the masters involved in this show are .. 
Dhee Finals : 
Sekhar master and poppy master reached finals. 
And Sekhar won the finals. 
D5 Brand ambassador was Young Rebel star " Prabhas ".
All show parts aired on 
Episode 1 - Sept 1 : Link

Read more

Popular Posts

Enter your email address:

Buffs ...


Powered by WidgetsForFree