> Is it possible to execute a Unix Script including calling SQLPLUS
with
> its parameters (Database-name and Password) but without having the
> password displayed when one uses the Unix PS (Processor Statistics?)
> Command? Maybe there are other Unix Commands which shows Password
too.
I normally use the following template for Unix shell scripts.
{
echo "Username: \c" ; read user
echo "Password: \c"; stty -echo; read pass; stty echo; echo
} > /dev/tty
sqlplus -s <<EOF
$user/$pass
set feedback off
set pagesize 0
SELECT SYSDATE FROM dual;
EOF
If you want to check that you cannot see the password from ps, replace
the SELECT ... FROM dual statement with something that takes a long
time. (E.g. anonymous PL/SQL block that counts to, say, a million.)
>
> The same applies for calling SQLLDR.
Same plot. Do not put the USERID directive in the command line and
sqlldr will prompt you for the username and password.
sqlldr CONTROL=whatever.ctl <<EOF
$user/$pass
EOF
>
> Thank you all very much.
>
> G. Oei
>
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.