Execute command stage with password

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
seanc217
Premium Member
Premium Member
Posts: 188
Joined: Thu Sep 15, 2005 9:22 am

Execute command stage with password

Post 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
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
splayer
Charter Member
Charter Member
Posts: 502
Joined: Mon Apr 12, 2004 5:01 pm

Post by splayer »

What is a "here script"? Also, I would think that password "encrypted" means it won't show anywhere including the log.
seanc217
Premium Member
Premium Member
Posts: 188
Joined: Thu Sep 15, 2005 9:22 am

Post 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.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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:
-craig

"You can never have too many knives" -- Logan Nine Fingers
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post 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.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
seanc217
Premium Member
Premium Member
Posts: 188
Joined: Thu Sep 15, 2005 9:22 am

Post 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.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Good to know! Thanks for posting that...
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply