dbTalk Databases Forums  

Best practise for distributed transactions and oracle procedures.

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Best practise for distributed transactions and oracle procedures. in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Ado
 
Posts: n/a

Default Best practise for distributed transactions and oracle procedures. - 01-07-2005 , 01:14 PM






Hi All,
I would appreciate it if I could get some opinions on my proposed solution.
On a nightly basis I have to execute a batch job that would does the
following

1) Execute a Stored Procedure to return a recordset of IDs from a SQL2K DB
(Can be up to 750,000m rows) and insert these ids into a Oracle database.
2) Then call a oracle procedure that will validate these ids against its
tables, return any ids and exceptions message in a ref cursors where the ids
do not exist. This can be 100k + rows.
3) Insert these exceptions into a exception table in our SQL2K DB.
4) Execute another oracle procedure that transfroms the data into another
oracle table (a driver table) and return any exceptions.
5) Capture these exceptions and insert in a SQL DB.
6) Execute 15 different select statements against 15 different tables
filtering by the driver table created in step 4. Some of these select
statements can return upto 3m rows.

My solution is to create a DTS package and schedule it to run nightly. I am
using transfrom data task for step 1, (although I have read it might be
quicker to use linkedservers and write a distributed query to insert the ids
into the oracle table.) The only way I can think of running the Oracle
Procedure is by writing a ActiveX script using ADO to execute the Oracle
Procedure and returns the exception Ref Cursor to a recordset. I then loop
throught the recordset and insert the exceptions one at a time into our SQL
DB. This could potenially be very slow. Do I have any other options ?

When this ActiveX script completes I call another ActiveX script for step 4
to build the driver table. I am thinking of combining the two activeX
scripts into 1.
Finally I have set up 15 Transfrom Data tasks for each table I need to get
data from. The source is a SQL statement against the oracle tables filtered
by the driver table created in step 4.

So I really am just interested in peoples opinions on this. Is there a
better solution out there as I feel performance is going to be a problem
with potentiallly 10m+ rows going back and forward nightly. Any opinions
would be welcome. I hope the above makes sence.

Cheers
Adrian



Reply With Quote
  #2  
Old   
Ado
 
Posts: n/a

Default Re: Best practise for distributed transactions and oracle procedures. - 01-11-2005 , 03:39 AM






Thanks !


"Ado" <Adrian_donnelly (AT) hotmail (DOT) com> wrote

Quote:
Hi All,
I would appreciate it if I could get some opinions on my proposed
solution. On a nightly basis I have to execute a batch job that would does
the following

1) Execute a Stored Procedure to return a recordset of IDs from a SQL2K DB
(Can be up to 750,000m rows) and insert these ids into a Oracle database.
2) Then call a oracle procedure that will validate these ids against its
tables, return any ids and exceptions message in a ref cursors where the
ids do not exist. This can be 100k + rows.
3) Insert these exceptions into a exception table in our SQL2K DB.
4) Execute another oracle procedure that transfroms the data into another
oracle table (a driver table) and return any exceptions.
5) Capture these exceptions and insert in a SQL DB.
6) Execute 15 different select statements against 15 different tables
filtering by the driver table created in step 4. Some of these select
statements can return upto 3m rows.

My solution is to create a DTS package and schedule it to run nightly. I
am using transfrom data task for step 1, (although I have read it might be
quicker to use linkedservers and write a distributed query to insert the
ids into the oracle table.) The only way I can think of running the Oracle
Procedure is by writing a ActiveX script using ADO to execute the Oracle
Procedure and returns the exception Ref Cursor to a recordset. I then loop
throught the recordset and insert the exceptions one at a time into our
SQL DB. This could potenially be very slow. Do I have any other options ?

When this ActiveX script completes I call another ActiveX script for step
4 to build the driver table. I am thinking of combining the two activeX
scripts into 1.
Finally I have set up 15 Transfrom Data tasks for each table I need to get
data from. The source is a SQL statement against the oracle tables
filtered by the driver table created in step 4.

So I really am just interested in peoples opinions on this. Is there a
better solution out there as I feel performance is going to be a problem
with potentiallly 10m+ rows going back and forward nightly. Any opinions
would be welcome. I hope the above makes sence.

Cheers
Adrian




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.