Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Hide SqlPlus username/password in UNIX Script

Re: Hide SqlPlus username/password in UNIX Script

From: Steve <noone_at_nowhere.com>
Date: Wed, 23 Apr 2003 17:21:12 GMT
Message-ID: <cYzpa.583832$3D1.323557@sccrnsc01>


Assuming you're just trying to hide the username/password from people using the "ps" command, you could do something like:

$ORACLE_HOME/bin/sqlplus /nolog <<EOF
connect scott/tiger
<execute SQL>
exit
EOF If you don't want hard-coded passwords in your scripts, you can substitute a connect string for OS authentication.

Steve

"gilgantic" <gilgantic_at_yahoo.com> wrote in message news:d6052717.0304230844.2382873d_at_posting.google.com...
> I want to hide the username and password when I run SqlPlus on in a UNIX
script.
> How do I do this?
>
> My original solution was to
> I execute the script under a super user (root user), which has
> no password, but the
>
> Example of what I have so far ...
> echo "execute sample;" | $ORACLE_HOME/bin/sqlplus scott/tiger
>
> Step 1: I login to UNIX using scott/tiger for username/password
> Step 2: I change to the Super User (ie. su superuser), which has no
password
> Step 3: Run the script with following line ...
> echo "execute sample;" | $ORACLE_HOME/bin/sqlplus superuser/
> I tried changing the username/password to the superuser.
>
> Of course, this failed. My reason for Step 3, was since superuser had no
> password associated with it, it would automatically login.
>
> Thanks!
> Gil
Received on Wed Apr 23 2003 - 12:21:12 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US