Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Hide SqlPlus username/password in UNIX Script
>>>>> "Gil" == gilgantic <gilgantic_at_yahoo.com> writes:
Gil> I want to hide the username and password when I run SqlPlus on Gil> in a UNIX script. How do I do this?
Gil> My original solution was to I execute the script under a super Gil> user (root user), which has no password, but the
Gil> Example of what I have so far ... echo "execute sample;" | Gil> $ORACLE_HOME/bin/sqlplus scott/tiger
Gil> Step 1: I login to UNIX using scott/tiger for username/password Gil> Step 2: I change to the Super User (ie. su superuser), which has Gil> no password Step 3: Run the script with following line ... echo Gil> "execute sample;" | $ORACLE_HOME/bin/sqlplus superuser/ I tried Gil> changing the username/password to the superuser. Gil> Of course, this failed. My reason for Step 3, was sinceGil> superuser had no password associated with it, it would Gil> automatically login.
Gil> Thanks! Gil
Just a couple of comments
command <<EOF
line
line
line
EOF
Where everything from the first EOF is sent to the command, line at a
time and executed as if it had been entered via standard input.
Tim
-- Tim Cross The e-mail address on this message is FALSE (obviously!). My real e-mail is to a company in Australia called rapttech and my login is tcross - if you really need to send mail, you should be able to work it out!Received on Thu Apr 24 2003 - 00:22:38 CDT
![]() |
![]() |