Need some simple help with nohupping a SQLplus script from within a BASH script

From: Chris Taylor <christopherdtaylor1994_at_gmail.com>
Date: Wed, 25 Sep 2013 11:55:27 -0500
Message-ID: <CAP79kiRgMveARBjF2gkFX+UCptakZ+6mjbyb9tkSRkx9P1p-_g_at_mail.gmail.com>



Goals/Givens:
1. Bash script
2. Solaris 5.10
3. Building this to run from Control-M job scheduler tool
4. hide the username/password from the command line (from ps -Aef)
5. parallelize the $sqlfile commands - each command can run independently -
would like to do this through nohup
Variables $logfile, $v_user, $v_pass, $sqlfile are all defined before this (of course)

If I write the script like this, it works but in serial and I need parallel: /opt/app/oracle/product/9.2.0/bin/sqlplus -s << EOF >> $logfile $v_user/$v_pass
_at_$sqlfile $table_name

EOF If I write it like this it works in parallel *but* shows the uname/password on the ps line.
nohup /opt/app/oracle/product/9.2.0/bin/sqlplus -s $v_user/$v_pass
_at_$sqlfile $table_name >> $logfile &

I wanted to do something like:
nohup /opt/app/oracle/product/9.2.0/bin/sqlplus -s << EOF >> $logfile $v_user/$v_pass
_at_$sqlfile $table_name

EOF & --- but this all fouled up, so I'm trying to figure out how to nohup the SQLPLUS << EOF bit?

Basically I'd like to nohup that block command but can't quite figure the syntax out.
(My shell script is built so that it doesn't continue until all the sqlplus commands have finished and then it will cat the output and search for custom exception messages. If custom exception message exists, then it will exit with a failure message so that Control-M sees that it failed and also will have the cat'd output in the console log)

Is there a way to do a nohup in a loop so that the uname/password doesn't show up on the ps list? I thought about assigning it to a variable but that doesn't really work to hide the username password either.

Any thoughts? Email me if you want some clarification.

Thanks for any suggestions/help.

Chris

--
http://www.freelists.org/webpage/oracle-l
Received on Wed Sep 25 2013 - 18:55:27 CEST

Original text of this message