How to run SQL*Plus script in batch?


I'm trying to run SQLPlus code in batch mode in HP-UX.  Any suggestions on how to make this happen?  Running Oracle 7.3.2 on HP9000 with Unix 10.20.


Ans:
The only problem there should be hardcoded username passwords in shell scripts.
The only precaution: Make sure . oraenv runs somehow before sqlplus is started

two methods:
sqlplus -s username/password@database @<name of plus script>
or
sqlplus -s username/password@database <<EOD
....
EOD
Note: piping and filtering works as expected.

Hth,

Sybrand Bakker, Oracle DBA
 
 

Hosted by www.Geocities.ws

1