Page 1 of 1

Execute command stage with password

Posted: Fri Mar 09, 2007 3:32 pm
by seanc217
Hi there,

I am trying to secure passwords as much as possible in the development of my jobs. I am attempting to run a sql script that I call from an execute command stage in a sequence.

In this stage I supply the command: sqlplus -s

Then I pass my connect information in the parameters section.

Everything works OK, but when I look in the log the password is shown decrypted. How can I prevent the log from showing the password parameter?

It is defined as an envrionment variable type encrypted.

TIA

Posted: Fri Mar 09, 2007 4:40 pm
by ray.wurlod
Create a shell script that acts as a wrapper to sqlplus and picks up the password from an environment variable that you've set elsewhere earlier in the same process. You'll need a "here script" within the shell script to respond to the sqlplus "Password:" prompt.

Posted: Fri Mar 09, 2007 4:48 pm
by splayer
What is a "here script"? Also, I would think that password "encrypted" means it won't show anywhere including the log.

Posted: Fri Mar 09, 2007 4:50 pm
by seanc217
Would that be your best practice recomendation or is there a better way to handle passwords to databases in datastage and passing them to scripts?

Thanks for the help.

Posted: Fri Mar 09, 2007 5:07 pm
by chulett
splayer wrote:What is a "here script"? Also, I would think that password "encrypted" means it won't show anywhere including the log.
http://en.wikipedia.org/wiki/Heredoc

And "encrypted" doesn't mean "invisible". :wink:

Posted: Sat Mar 10, 2007 1:12 am
by kumar_s
sqlplus -s would use the silent mode of sqlplus. But the command and the parameter that you pass to sqlplus command need to be executed wihtout logging or atleast log with encrypted.
How are you executing the command.?
If you are trying with Before/After job, use ExecShSilent.

Posted: Tue Mar 13, 2007 9:17 am
by seanc217
I put this ticket into support, here's a good resolution.

Thanks for all the help.


Support for the directive "/NOLOG/" was added to the Execute Command stage to address this issue. Add that directive to the beginning of your "Parameters" property in the stage to suppress that logging.

Posted: Tue Mar 13, 2007 9:31 am
by chulett
Good to know! Thanks for posting that...