How to run a Unix script from another server ??

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
rajeevs
Participant
Posts: 14
Joined: Thu Jan 12, 2006 10:42 am

How to run a Unix script from another server ??

Post by rajeevs »

From DataStage (which is on one server), how do you run a unix script from Oracle (which is on another server)?
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Use a call to UNIX shell script and use rsh.
rajeevs
Participant
Posts: 14
Joined: Thu Jan 12, 2006 10:42 am

Post by rajeevs »

ArndW wrote:Use a call to UNIX shell script and use rsh.
If you do not mind Can you please explain in detail ??
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

From the Unix prompt, type in "man rsh" and read it in detail. You can always use Google.
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
rleishman
Premium Member
Premium Member
Posts: 252
Joined: Mon Sep 19, 2005 10:28 pm
Location: Melbourne, Australia
Contact:

Post by rleishman »

...how do you run a unix script from Oracle


Taking you literally, to run a Unix script from Oracle, see http://www.orafaq.com/forum/mv/msg/5517 ... msg_147495

In short, it's easy on Oracle 10g using DBMS_SCHEDULER package, trickier otherwise because you have to write you own launcher in C and hook it into PL/SQL. Once you get a PL/SQL stored procedure calling your script, just call the stored proc from the after-sql of the OCI stage with

Code: Select all

call proc_name(args)
Ross Leishman
Post Reply