Re: Hiding password from ps - Need better solution
Date: 1996/04/09
Message-ID: <316A908A.4E56_at_CAPITAL.GE.COM>#1/1
badri wrote:
>
> Hi:
>
> We have an ORACLE 7.2 database on Dynix/ptx 4.1.2. I wanted
> to hide the username and password from "ps" command.
>
> If my command is
>
> sqlplus username/password _at_command arguments
>
> I want ps (or ps -ef) to show
>
> sqlplus _at_command arguments
>
> Any ideas?
>
> thanks a lot,
>
> -Badri
I have used several methods to get around this problem. One way is to use OPS$ Oracle connections, although this is not practical in some environments. Basically I used OPS$ for cron jobs running on our UNIX box. The cron user was oraprod, so the Oracle user OPS$ORAPROD had all the roles and privileges necessary for whatever needed to be done. This works for SQL*Plus and SQL*Reportwriter programs.
Another way to run SQL*Plus is to use something like
echo "password" | sqlplus -s userid _at_program_name > output_file
Unfortunately the password is embedded in the script, but at least it is invisible to the ps command.
Hope this helps.
-- Roger Harris Oracle DBA GE Credit Corp Danbury, CTReceived on Tue Apr 09 1996 - 00:00:00 CEST