Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Writing shell scripts for nt and sqlplus?

Writing shell scripts for nt and sqlplus?

From: <kevinoleniczak_at_my-deja.com>
Date: Sat, 02 Dec 2000 18:54:42 GMT
Message-ID: <90bghh$imr$1@nnrp1.deja.com>

I'm trying to write a windows batch file that will do several things, one of which is to login to oracle via sqlplus and execute a few commands. In unix this was easy.

You would write a shell script to do something, then login oracle via sqlplus, do something there, and then exit. To do this you would do something like...

sqlplus user/pass >>eof
  command1 for oracle
  another command or statement
  maybe a third command
eof

the above script would login with the account info and then execute everything between the "eof" or whatever tag name you wanted. This worked well and allowed variables or constants to be shared between the shell part of the script and the oracle / sqlplus part of the script.

How do you replicate this functionality for windows nt 4? Ultilamtely I need a batch file that can do something like sql-load a file, and then do something special if an error was encountered. Any clues would be appreciated.

Thanks,
Kevin

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Sat Dec 02 2000 - 12:54:42 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US