Execute Oracle procedure from UNIX prompt [message #109842] |
Tue, 01 March 2005 02:51 |
shahaness
Messages: 8 Registered: July 2004
|
Junior Member |
|
|
I want to execute a Oracle procedure from UNIX script.
I hv written the following in the script file(.SH file):
-----------------------------------------
sqlplus newclsdev/newclsdev@aurdb;
//Execute the procedure which does something and commits
exec test_i();
exit;
-----------------------------------------
Problem -
This script just connects to oracle and stops aat the
sql prompt.
I want to execute the procedure and come back to UNIX prompt again.i.e exec and exit should work.
But it is not happening.
Pl. help.
Thanks
|
|
|
|
|
Re: Execute Oracle procedure from UNIX prompt [message #109987 is a reply to message #109961] |
Wed, 02 March 2005 10:48 |
scott.swank
Messages: 14 Registered: March 2005 Location: Las Vegas
|
Junior Member |
|
|
Note that anyone who runs "ps -ef | grep sqlplus" on the same Unix box will see that your password is tiger as long as your sqlplus session is running. You can do things like:
echo tiger | sqlplus scott@your_database @your_script
And then the password is provided to sqlplus via a friendly pipe that is not externally visible. There are other options (os credentials, for example), but this at least gives you one option that is somewhat secure.
|
|
|