Calling Shell Scripts

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
dsuser
Participant
Posts: 12
Joined: Mon Sep 15, 2003 9:11 pm

Calling Shell Scripts

Post by dsuser »

Hi,

Can someone throw some light on calling a shell script(execsh/rexec)(to call a PL/SQL Script in a remote Oracle Server) from Datastage.

Note: The Datastage Engine and the Oracle Server(the target db) are not on the same box.

Thanks,
dsuser
trobinson
Participant
Posts: 208
Joined: Thu Apr 11, 2002 6:02 am
Location: Saint Louis
Contact:

Post by trobinson »

PL/SQL script? Do you mean a SQLPlus script or anonymous block of PL/SQL code? You can shell out to UNIX and run a script. Your DS Engine machine must be an Oracle client and have the remote Oracle DB defined to it via the tnsnames.ora.

Why shell out? Is there some reason you cannot run the PL/SQL from an OCI stage (oops, I meant ODBC stage?) from within the job as a function or procedure?
Teej
Participant
Posts: 677
Joined: Fri Aug 08, 2003 9:26 am
Location: USA

Re: Calling Shell Scripts

Post by Teej »

Do something like this:

echo 'exec package;' | sqlplus username/password@sid

-T.J.
Developer of DataStage Parallel Engine (Orchestrate).
Post Reply