Computing.Net > Forums > Unix > Automatic Exit after PL/SQL script

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Automatic Exit after PL/SQL script

Reply to Message Icon

Name: Dennis_Allan
Date: April 19, 2004 at 12:43:31 Pacific
OS: UNIX
CPU/Ram: Pentium III 1 GIG
Comment:

Hello,
I have a Bourne Shell script that first calls sqlldr then logs into SQL Plus to run a PL/SQL script. However, when I run this script, I need to type in 'exit' or <ctrl-d> to get back to the cursor. I would like to be able to run the script and have the cursor return automatically. Here is my script:

#!/bin/sh
sqlldr <usrname>/<pw> control = control.ctl
sqlplus -s <username>/<pw> @script3.txt
exit
EOF

Any help is appreciated. Thanks.

Dennis



Sponsored Link
Ads by Google

Response Number 1
Name: Jim Boothe
Date: May 2, 2004 at 08:44:47 Pacific
Reply:

You need to put an exit command at the end of script3.txt.

If that is not a good option, then you can code your script like this:

#!/bin/sh
sqlldr <usrname>/<pw> control = control.ctl
sqlplus -s username/password << endplus
@script3.txt
exit
endplus
exit


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: Automatic Exit after PL/SQL script

calling a script from pl/sql www.computing.net/answers/unix/calling-a-script-from-plsql/4224.html

Shell script to fire sql scripts... www.computing.net/answers/unix/shell-script-to-fire-sql-scripts/6352.html

How to call unix script from pl/sql www.computing.net/answers/unix/how-to-call-unix-script-from-plsql/7767.html