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

From: Adams, Matthew (GE, Appl & Light) <"Adams,>
Date: Wed, 25 Sep 2013 17:32:24 +0000
Message-ID: <>

Oracle used to publish a very simple C program called 'hide' which would (on unix) do a fork/exec of your sqlplus program, but would space pad the arguments past the end of what 'ps' could report, thus hiding the username and password. Then all you need to do is create an alias at the OS level to invoke hide when sqlplus was called.

I still use the executable I compiled many years ago for this but can't seem to locate the source code. I'm sure it would be relatively easy to locate.

Matt Adams

-----Original Message-----

From: [] On Behalf Of Chris Taylor Sent: Wednesday, September 25, 2013 12:55 PM To:
Subject: Need some simple help with nohupping a SQLplus script from within a BASH script


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.



-- Received on Wed Sep 25 2013 - 19:32:24 CEST

Original text of this message