Running Stored Procedure in Oracle Enterprise Stage

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
Suman
Participant
Posts: 53
Joined: Thu Oct 07, 2004 8:28 am

Running Stored Procedure in Oracle Enterprise Stage

Post by Suman »

I am trying to convert a server job to a parrallel job and in the server job in oracle oci stage one stored procedure is triggered before the sql query.Similar option is not present in Oracle Enterprise Stage.
If someone has any information on how to do this in parrallel job then please reply.
keshav0307
Premium Member
Premium Member
Posts: 783
Joined: Mon Jan 16, 2006 10:17 pm
Location: Sydney, Australia

Post by keshav0307 »

Your Oracle OCI stage is source or target?

if its not possible is a single job then you can make a sequece and call the stored procedure before/after the sql query.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Can't you do that in the 'Open Command' area, or whatever it is called? :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
Suman
Participant
Posts: 53
Joined: Thu Oct 07, 2004 8:28 am

Post by Suman »

The Oracle oci stage is source stage. For target Oracle oci stage I can use Stored procedure stage before the Oracle enterprise stage in parallel job.For source oracle stage I am planning to use a script which will call the stored procedure in a before job routine.
Suman
Participant
Posts: 53
Joined: Thu Oct 07, 2004 8:28 am

Post by Suman »

chulett wrote:Can't you do that in the 'Open Command' area, or whatever it is called? :?
I have not tried that option but definitely look this option.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Open command is equivalent to 'Before Sql' in Server and Close command is equivalent to 'After Sql'.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Suman
Participant
Posts: 53
Joined: Thu Oct 07, 2004 8:28 am

Post by Suman »

DSguru2B wrote:Open command is equivalent to 'Before Sql' in Server and Close command is equivalent to 'After Sql'. ...
I have tried executing the command 'call schemaname.procedurename();' in Open command option. It is not exceuting the procedure and not giving any error message also. Is there any other way to call the procedure in this option.

Suman
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Try it with exec schemaname.procedurename(). Also try without the trailing semicolon. We had different results on different versions in the recent past.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Suman
Participant
Posts: 53
Joined: Thu Oct 07, 2004 8:28 am

Post by Suman »

DSguru2B wrote:Try it with exec schemaname.procedurename(). Also try without the trailing semicolon. We had different results on different versions in the recent past. ...
I have tried with exec without the semicolon. Still the procedure is not getting executed.We are using datstage version 7.5.2.

Suman
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

I did a quick search and you were using the correct syntax. Forget the exec and lets put call back. So now your OPEN statement should be
call schemaname.storedprocedurename(). Try getting rid of the trailing semicolon. If that doesnt work get your dba involved, ask him to monitor if the stored procedure really did or did not get fired. Maybe it did but something happened to it half way.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Suman
Participant
Posts: 53
Joined: Thu Oct 07, 2004 8:28 am

Post by Suman »

DSguru2B wrote:I did a quick search and you were using the correct syntax. Forget the exec and lets put call back. So now your OPEN statement should be
call schemaname.storedprocedurename(). Try getting rid of the trailing semicolon. If that doesnt work get your dba involved, ask him to monitor if the stored procedure really did or did not get fired. Maybe it did but something happened to it half way.
Finally the procedure is working with the syatax 'call schemaname.storedprocedurename()' without semicolon. The problem was there was no commit in the procedure. Thanks to all of you for your valuable suggestion and Happy New Year to all.

Suman
Post Reply