Call stored procedure in Sequence

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
sheema
Premium Member
Premium Member
Posts: 204
Joined: Sat Jul 22, 2006 10:20 am

Call stored procedure in Sequence

Post by sheema »

Hi,
Can we call a Oracle Stored procedure in Job sequences .
Thanks

Sheema
g_rkrish
Participant
Posts: 264
Joined: Wed Feb 08, 2006 12:06 am

Post by g_rkrish »

You have to try with execute command activity..with creating a small unix script that will connect to the database and execute the stored procedure...I feel in oracle you run a stotred procedure in command prompt....
RK
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

In other words, a scripted call to sqlplus with the script launched by the Execute Command stage. Make no assumptions about the runtime environment and ensure it works outside of DataStage first, then add it to your Sequence. Also make sure errors are properly reported back from your proc to sqlplus to the script and lastly passed back to DataStage from the script's exit status - otherwise when it fails your Sequence job will have no clue.
-craig

"You can never have too many knives" -- Logan Nine Fingers
sachin1
Participant
Posts: 325
Joined: Wed May 30, 2007 7:42 am
Location: india

Post by sachin1 »

you have to create a script that will call your procedure in a file and call it in Execute_Command Stage like

for windows env:(try for unix env)

sqlplus -s oracle/oracle@BIODS @d:\datastage\data\india1\sachin\in\test.sql;

where test.sql contains

begin
test_procedure;
end;
/
exit
sheema
Premium Member
Premium Member
Posts: 204
Joined: Sat Jul 22, 2006 10:20 am

Post by sheema »

Thanks for all the inputs.
Thanks

Sheema
praveensuss
Participant
Posts: 12
Joined: Thu Sep 20, 2007 2:22 pm

Post by praveensuss »

You can use "Stored Procedure stage" available with DataStage to call the stored procedures and sequence them through a Job Sequencer..I hope this shld work..
Praveen..
Post Reply