The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 02-08-2007
sumeet sumeet is offline
Registered User
  
 

Join Date: Nov 2006
Posts: 33
depends on what database you are using

I am using DB2

so once you connect to db2 run the following on unix prompt:

db2 -tvf query.file -z result.file

I dont remeber how to implement it on Oracle. But as far I can recollect:

sqlplus -s @username/password < $sql_file.sql > $sql_file.log

thanks
Sumeet