Remote Command Tools?
Moderators: chulett, rschirm, roy
Remote Command Tools?
Can anyone recommend tools or procedures we can incorporate into DataStage Server jobs to execute a remote command on another server when a DataStage job completes (or via job control language)
We have a DataStage job that builds a source file for an application on another server and that application has an import script (.bat) that needs to run when DataStage has built the source file.
Both our DataStage server and the other application server are Windows 2003. Any ideas?
Thanks,
Greg
We have a DataStage job that builds a source file for an application on another server and that application has an import script (.bat) that needs to run when DataStage has built the source file.
Both our DataStage server and the other application server are Windows 2003. Any ideas?
Thanks,
Greg
I know how to execute commands locally using DSExecute.
I'm trying execute a command located on a remote server.
I want to run a .bat command on the remote server that initiates a load routine with the remote application. I need this command event triggered based upon the successful completion of the DataStage server job that is creating the source file used by the remote loading application.
For example, SERVER1 is an application server for a sales data inquiry application. On this server is a .bat script that executes several PowerBuilder .exe jobs to process the previous day's sales data out of a database. I want this .bat script to run as soon as I know that the database is loaded with the previous day's sales data. DataStage is located on SERVER2 and contains a server job responsible for loading this sales data on a daily basis. When the DataStage job is complete on SERVER2, then I want to run the .bat command on SERVER1.
I'm interesting in knowing how others are accomplishing this.
Thanks,
Greg
I'm trying execute a command located on a remote server.
I want to run a .bat command on the remote server that initiates a load routine with the remote application. I need this command event triggered based upon the successful completion of the DataStage server job that is creating the source file used by the remote loading application.
For example, SERVER1 is an application server for a sales data inquiry application. On this server is a .bat script that executes several PowerBuilder .exe jobs to process the previous day's sales data out of a database. I want this .bat script to run as soon as I know that the database is loaded with the previous day's sales data. DataStage is located on SERVER2 and contains a server job responsible for loading this sales data on a daily basis. When the DataStage job is complete on SERVER2, then I want to run the .bat command on SERVER1.
I'm interesting in knowing how others are accomplishing this.
Thanks,
Greg
I have done it in the past in the following way. Write a batch file to connect to a remote server and then put or get files from that server. I have use DSExecute API's within a routine to execute this batch file successfully. In your case, I am guessing you will have to write a batch file which connects to the remote server and then calls the required .bat command. Is this what you might be interested in looking at? I have posted a routine couple of weeks back which achieves this. You might want to take a look at it here to get an idea.If you have any questions please let me know.
Kris
Where's the "Any" key?-Homer Simpson
Where's the "Any" key?-Homer Simpson
The important note that I was trying to make clear is that I want the command to run on SERVER1, not on the DataStage SERVER2.
If SERVER2 executes the command \\SERVER1.yourdomain.com\Temp\Test.bat it will run on SERVER2.
I'll test it, but I don't see how that command submits the processing over to SERVER1. You're just calling a command to run on SERVER2 that's stored on SERVER1.
Thanks for the responses
Greg
If SERVER2 executes the command \\SERVER1.yourdomain.com\Temp\Test.bat it will run on SERVER2.
I'll test it, but I don't see how that command submits the processing over to SERVER1. You're just calling a command to run on SERVER2 that's stored on SERVER1.
Thanks for the responses
Greg
REMSH, RSH, RLOGIN, SSH, SCP. Check out these commands, as they are available on both Windoze and Unix implementations. You can remote shell login to a server, run a command locally on that machine, and then exit. For secured environments, SSH and SCP are what you could use. For SSH and SCP, you can authorize an RSA-KEY for a user such that you won't need to pass userid and password everytime SCP and SSH are used if they are executed as that specific user going to a specifically authorized machine. Google for more info.
Kenneth Bland
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Doesn't a batch file something like this work for you?
where 1,2,3 are parameters---servername, username, password to log on to remote server respectively.
Code: Select all
echo open %1 >%0.txt
echo %2>> %0.txt
echo %3>> %0.txt
echo ascii >>%0.txt
echo cd path to batch2.bat >>%0.txt
echo call batch2.bat >>%0.txt
echo quit >>%0.txt
ftp -s:%0.txt > %0.log
del %0.txt
exit
Kris
Where's the "Any" key?-Homer Simpson
Where's the "Any" key?-Homer Simpson