Page 1 of 1

How to run a Unix script from another server ??

Posted: Thu Jan 12, 2006 10:59 am
by rajeevs
From DataStage (which is on one server), how do you run a unix script from Oracle (which is on another server)?

Posted: Thu Jan 12, 2006 1:10 pm
by ArndW
Use a call to UNIX shell script and use rsh.

Posted: Thu Jan 12, 2006 1:52 pm
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 ??

Posted: Thu Jan 12, 2006 2:11 pm
by kcbland
From the Unix prompt, type in "man rsh" and read it in detail. You can always use Google.

Posted: Thu Jan 12, 2006 4:15 pm
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)