Page 1 of 1

Unix OS command from a Windows Server

Posted: Tue Jun 26, 2007 2:28 pm
by jshurak
We've had a number of shell scripts in places for a few years, but lately they've been giving us lots of heartache. They are controlled by other shell scripts that we have, task runners. The task runners kick off the individual shell scripts, which in turn kick of a pl/sql stored procedure, then create a certain file so the task runner can kick off the next shell script.

I came up with the idea of simply creating the task runner in datastage with a series of stored procedure stages. This should be perfectly fine, except some of the shell scripts also issue some OS commands before they kick off the store procedure. The commands are simple cat commands.

Our DS server is window. Can the command stage contact our unix server and issue these commands.

Posted: Tue Jun 26, 2007 3:50 pm
by kcbland
Research using rsh or ssh to run a command on a remote server. Unix->Unix, Unix->Windoze, Windoze->Windoze, it's all the same. You just need to setup permissions/authority. Then, your command stage can run the DOS/Windoze script which in turns runs the appropriate command using rsh/ssh to connect to the remote server and issue your remote server specific script/commands.

One trick to avoid writing a remote script is to "stack" commands with a semi-colon.

Another trick is to generate a temporary .ksh script on your Windoze machine, scp it to the remote machine, then ssh to the remote machine and run it.