Page 1 of 1

Omit Username and Password in DSJob -run command

Posted: Fri Mar 02, 2007 4:18 pm
by ch_on14
I am using a Windows Batch file to execute a Master Sequence in DataStage. Presently I am using the following command in the batch file:

echo @"%clientdir%\dsjob" -server %servername% -run -mode NORMAL -warn 50 -wait -param RunSched= %paramval% %ds_project% %mainjob%
@%clientdir%\dsjob -server %servername% -user %dsuserid% -password %dspasswd% -run -mode NORMAL -warn 50 -wait -param RunSched=%paramval% %ds_project% %mainjob%

Where:
set clientdir="C:\Ascential\DataStage\Engine\bin"
set servername= "DS Server IP Address"
set ds_project= "Project Name"
set mainjob=seq_MASTER_Sequence
rem set dsuserid=%1
rem set dspasswd=%2
set paramval=%3

Basically when I call my batch file in Windows I give 3 parameters.... the username, password and an extra parameter for RunSchedule.

My question is .... how can I execute the same job but not pass the UserName and Password as parameters... obviously for security reasons we do not want to display them.

Posted: Fri Mar 02, 2007 4:42 pm
by ray.wurlod
Set them up as environment variables and obtain them from those.

Posted: Fri Mar 02, 2007 4:43 pm
by chulett
Or you can put them in a file and use the -file option on the command line. Based on the server you specify, it will pull the appropriate record from the file.

File format:

server,user,password

Edited to add: off course, this is all in 'clear text'.

Posted: Fri Mar 02, 2007 4:55 pm
by ch_on14
chulett wrote:Or you can put them in a file and use the -file option on the command line. Based on the server you specify, it will pull the appropriate record from the file.

File format:

sever,user,password




That is definitely an option that I am considering... Although would prefer to not have the username and password show up anywhere.. because then we need to maintain the other file and see that it has the proper data.

I was curious to see if the HostName = 127.0.0.1 can I not give the username and password. Since we can use the Omit when logging into DataStage. Question would be that to use the 127.0.0.1 hostname, do I have to be logged into Windows with the DSAdmin account used to install the DataStage Server ... or can I be logged into Windows with any DataStage user.

Posted: Fri Mar 02, 2007 5:06 pm
by chulett
I for one can't tell you - don't have a Windows based server. Give it a shot, let us know! :wink:

Posted: Fri Mar 02, 2007 5:29 pm
by ch_on14
chulett wrote:I for one can't tell you - don't have a Windows based server. Give it a shot, let us know! :wink:


FYI... the batch file worked as long as I was logged into the Server with the same username and password that was used to install the DataStage Server (DSAdmin). Maybe any other user with the same permissions might work. A user with limited permissions gave an error while logging into the server with IP 127.0.0.1.