Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Question: running a SQLPlus script from the UNIX shell with passwords??
Hey, all.
I have a database with several IDs, all of which I need to log into to run a single procedure.
I'm running 9i
I have the SQL for the procedure ready, but at this point the only way I can make it work is to log in as each ID and run the SQL.
Is there any shell script I can create that will help me here?
What I need is a shell script that will log into SQLPlus using each ID in turn, and pass the SQL script into SQLPlus
For example, a script that says
for userid in (user1, user2, user3...)
sqlplus /userid @script.sql
or
sqlplus /user1 @script.sql sqlplus /user2 @script.sql sqlplus /user3 @script.sql
or something like that? I'd want to make it secure, so I would have to pass the hash values of the oracle passwords in the script somehow.
The logic of how I would include hashed passwords in this kind of scenario eludes me.
Any wisdom would be appreciated!
Thanks,
DW Received on Wed Mar 09 2005 - 12:33:11 CST
![]() |
![]() |