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: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: Thu, 24 Apr 2003 08:56:12 +0800
Message-ID: <3EA7362C.4C81@yahoo.com>


gilgantic wrote:
>
> 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

in ksh you can

print "
  connect xxx/yyy
  @script" | sqlplus /nolog

hth
connor

-- 
=========================
Connor McDonald
http://www.oracledba.co.uk

"Some days you're the pigeon, some days you're the statue"
Received on Wed Apr 23 2003 - 19:56:12 CDT

Original text of this message

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