Home » Infrastructure » Unix » How to hide db uname/pwd from PS in Perl
How to hide db uname/pwd from PS in Perl [message #132289] Thu, 11 August 2005 14:06
wzs33j
Messages: 2
Registered: August 2005
Location: India
Junior Member
Hi all,
I could find solution for hiding database username/password appearing on system process table while using 'ps -ef|grep sql*' command in unix.
For this I used the following:
USER = username
PASS = password
{ echo ${USER}/${PASS}@TNS; cat <sqlfile>; } | sqlplus -s

Could any one help me out in doing the same in Perl script?

While I used the same cmd in perl as

open(SQLFILE,">$SQLF");
print SQLFILE ("$a");
close SQLFILE;
$b=`{ echo ${USER}/${PASS}@TNS; cat $SQLF; } | $sqlplus -s`;
open(SQL,$b);
print SQL ("$b\n");
close SQL;

I am getting an error as:
Input Truncated to 239 characters
Previous Topic: Upgrade 8.1.7 to 10g.
Next Topic: java.lang.UnsatisfiedLinkError: getLocalHostName in AIX
Goto Forum:
  


Current Time: Mon Nov 25 21:42:05 CST 2024