Stored Procedure and Network bottlenect!

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
raoraghunandan
Charter Member
Charter Member
Posts: 19
Joined: Sun Jul 20, 2003 4:29 am

Stored Procedure and Network bottlenect!

Post by raoraghunandan »

Hi All,

We are calling a Oracle Stored Procedure in after-sql in our Target OCI 9i Stage. This Stored procedure basically selects records from our source database(oracle 9i) using a database link, does some complex transformations and inserts into target database(oracle 9i). The source and target databases are in the same location. Our DataStage Server is at a different location from our source and target databases and there are some network bottlenecks because of this.

My Question is would the Oracle Stored procedure processing also suffer from these network bottlenecks since the stored procedure should get processed within the database?

-rao
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Rao,

as you correctly surmised, the Stored Procedure execution is done within the database and you will not have any data going across the network when you execute it.
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Your Oracle to Oracle links works as

Oracle DB ===> Oracle DB

But via DataStage, it becomes

Oracle DB ==> DataStage Server ==> Oracle DB

Your dbLink is generally slow. Even though the 2 db are in the same machine, they may talk via SQL*Net. Thus there is an output and then an input action. This will be slow compared to having the source and target db as the same.

Your connection via DataStage depends on the network.

Even though from the initial top level look it appear to be slow than db to db link, you can have high power networks to minimise this.
raoraghunandan
Charter Member
Charter Member
Posts: 19
Joined: Sun Jul 20, 2003 4:29 am

Post by raoraghunandan »

Thanks for the prompt responses.
However, Sainath's response has confused me. Are you saying that in the case that i mentioned, there would be network bottlenecks even for the stored procedure?
When I execute the stored procedure in sqlplus it gets executed in around a hour.

So, If I have a dummy mapping and I am calling this procedure in after-sql, then this mapping should take the same amount of time as the stored procedure is executed within the db ?

-Rao
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Rao,

Sainath was just explaining the basic function of DS and that if your server machine is different from the DB machine(s) you will be getting a network bottleneck. In your case you are not processing the stored procedure for each row, but only once, so the actual data processing is not done by DS over the net but in Oracle within the database.
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Yep. ArndW is correct. An After-SQL gets processed only once. Even though it is triggered from DataStage server, your stored procedure will run as usual.

You may need to ensure that the user defined in the OCI stage has necessary authorisation to invoke the procedure.
raoraghunandan
Charter Member
Charter Member
Posts: 19
Joined: Sun Jul 20, 2003 4:29 am

Post by raoraghunandan »

Thanks Arnd and Sainath.

Topic Closed...

-Raghu
Post Reply