dbTalk Databases Forums  

DTS Issue - Urgent

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


Discuss DTS Issue - Urgent in the microsoft.public.sqlserver.dts forum.



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

Default DTS Issue - Urgent - 07-20-2005 , 10:08 AM






Hi there,

I have created a DTS that copies data from a table in SQL Server to a table
with the same structure, but in Oracle.

Lets suppose I have 100 rows in the origin table. If the DTS fails in he
middle of the operation, supposing the row 55 has an error, the previous
rows are copied to the Oracle table.

How can I now wich rows have been copied?

The DTS runs periodicaly, and I need to know wich rows are copied, so I can
block them on the SQL Server, so they can not be copied again to Oracle.

Can anybody help me? Thanks in advance.

Regards,

Marco



Reply With Quote
  #2  
Old   
Rick Gittins
 
Posts: n/a

Default Re: DTS Issue - Urgent - 07-20-2005 , 10:17 AM






Do the tables have a primary key? If they do you can write a query to
exclude the records already transformed.

Rick

"Marco Pais gmail.com>" <marco.pais@<IGNORE> wrote

Quote:
Hi there,

I have created a DTS that copies data from a table in SQL Server to a
table
with the same structure, but in Oracle.

Lets suppose I have 100 rows in the origin table. If the DTS fails in he
middle of the operation, supposing the row 55 has an error, the previous
rows are copied to the Oracle table.

How can I now wich rows have been copied?

The DTS runs periodicaly, and I need to know wich rows are copied, so I
can
block them on the SQL Server, so they can not be copied again to Oracle.

Can anybody help me? Thanks in advance.

Regards,

Marco




Reply With Quote
  #3  
Old   
Marco Pais
 
Posts: n/a

Default Re: DTS Issue - Urgent - 07-20-2005 , 10:27 AM



Hi.

They have a primary key. How/where can I write that query?

Marco

"Rick Gittins" <rgittins (AT) dungarvin (DOT) com> escreveu na mensagem
news:%23ajiG4TjFHA.1044 (AT) tk2msftngp13 (DOT) phx.gbl...

Quote:
Do the tables have a primary key? If they do you can write a query to
exclude the records already transformed.

Rick

"Marco Pais gmail.com>" <marco.pais@<IGNORE> wrote in message
news:%23jYK9yTjFHA.2156 (AT) TK2MSFTNGP14 (DOT) phx.gbl...
Hi there,

I have created a DTS that copies data from a table in SQL Server to a
table
with the same structure, but in Oracle.

Lets suppose I have 100 rows in the origin table. If the DTS fails in he
middle of the operation, supposing the row 55 has an error, the previous
rows are copied to the Oracle table.

How can I now wich rows have been copied?

The DTS runs periodicaly, and I need to know wich rows are copied, so I
can
block them on the SQL Server, so they can not be copied again to Oracle.

Can anybody help me? Thanks in advance.

Regards,

Marco






Reply With Quote
  #4  
Old   
Narayana Vyas Kondreddi
 
Posts: n/a

Default Re: DTS Issue - Urgent - 07-20-2005 , 01:14 PM



I would suggest you first get your data from SQL Server to a temporary table
in Oracle, and then use the MINUS operator to work out which rows don't
already exist in your main Oracle table.
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @ http://vyaskn.tripod.com/


"Marco Pais" <IGNOREmarco.pais (AT) gmail (DOT) com> wrote

Quote:
Hi.

They have a primary key. How/where can I write that query?

Marco

"Rick Gittins" <rgittins (AT) dungarvin (DOT) com> escreveu na mensagem
news:%23ajiG4TjFHA.1044 (AT) tk2msftngp13 (DOT) phx.gbl...

Do the tables have a primary key? If they do you can write a query to
exclude the records already transformed.

Rick

"Marco Pais gmail.com>" <marco.pais@<IGNORE> wrote in message
news:%23jYK9yTjFHA.2156 (AT) TK2MSFTNGP14 (DOT) phx.gbl...
Hi there,

I have created a DTS that copies data from a table in SQL Server to a
table
with the same structure, but in Oracle.

Lets suppose I have 100 rows in the origin table. If the DTS fails in he
middle of the operation, supposing the row 55 has an error, the previous
rows are copied to the Oracle table.

How can I now wich rows have been copied?

The DTS runs periodicaly, and I need to know wich rows are copied, so I
can
block them on the SQL Server, so they can not be copied again to Oracle.

Can anybody help me? Thanks in advance.

Regards,

Marco








Reply With Quote
  #5  
Old   
Darren Green
 
Posts: n/a

Default Re: DTS Issue - Urgent - 07-20-2005 , 02:37 PM



In message <uroCkbVjFHA.3316 (AT) TK2MSFTNGP14 (DOT) phx.gbl>, Narayana Vyas
Kondreddi <answer_me (AT) hotmail (DOT) com> writes
Quote:
I would suggest you first get your data from SQL Server to a temporary table
in Oracle, and then use the MINUS operator to work out which rows don't
already exist in your main Oracle table.
It might be a bit expensive if you have a lot of rows. Perhaps you could
use a date parameter to exclude old rows, and only transfer the latest
rows. If you can rely on dates or some other regularly increasing (key)
value. If it is not accurate enough transfer a bit more than you need
then use the MINUS idea as above, but it should save all data moving
across.


--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org



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.