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.
Omit Username and Password in DSJob -run command
Moderators: chulett, rschirm, roy
-
ray.wurlod
- Participant
- Posts: 54595
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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'.
File format:
server,user,password
Edited to add: off course, this is all in 'clear text'.
Last edited by chulett on Fri Mar 02, 2007 4:57 pm, edited 1 time in total.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
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.
chulett wrote:I for one can't tell you - don't have a Windows based server. Give it a shot, let us know!
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.
