Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: mask password
Tom76 wrote:
>
> my question was for a batch program. and i found a solution myself.
>
> but since you raised the sqlplus example. i want to ask more abt that.
> i tried your "echo $PASS | sqlplus userid " syntax but sqlplus connects
> and immediately disconnects.
> have you tested and do u have this syntax working. what i am trying is
> to connect through sqlplus using the masking password method and remain
> logged in.
Its what we use when we are running scripts etc. Some examples are:
echo $PASS | sqlplus userid @my_batch_file.sql
where 'my_batch_file.sql' contains the stuff you want to run
or you can use:
sqlplus /nolog @my_batch_file.sql
where 'my_batch_file.sql' contains
connect user/pass
<stuff you want to run>
exit
or you can have it all inline
print "
conn user/pass
select * from ...
etc
etc" | sqlplus /nolog
hth
connor
-- Connor McDonald Co-author: "Mastering Oracle PL/SQL - Practical Solutions" Co-author: "Oracle Insight - Tales of the OakTable" web: http://www.oracledba.co.uk web: http://www.oaktable.net email: connor_mcdonald_at_yahoo.com "Semper in excremento, sole profundum qui variat." ------------------------------------------------------------Received on Tue May 10 2005 - 06:29:12 CDT