dbTalk Databases Forums  

Update / Insert Table throught DTS

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


Discuss Update / Insert Table throught DTS in the microsoft.public.sqlserver.dts forum.



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

Default Update / Insert Table throught DTS - 07-22-2004 , 11:31 PM






Dear all,
I understand this has been asked before but I don't quite understand exactly
how to do this

The situation is
I have source data in Oracle database and the destination in MS Sql server

Suppose I have table A in both Oracle database and MS Sql server which have
the same table stucture.

Destination MS Sql server already have some rows
Source Oracle server has the same rows (same Primary key) but updated
columns and
rows that not exists in MS Sql server

What I want to do is using DTS to update the table if same PK is found in
Destination table A, else insert the row in Table A of Destination?

I have never use DTS before so I would like to ask all detailed steps that I
need to take in order to accomplish the above.

The other thing is I don't want to create temp tables in the destination
database to store all data and then run a store procedure to do the data
transfer. That will be my last option.

Thanks a lot.






Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Update / Insert Table throught DTS - 07-23-2004 , 02:03 AM






Can you not identify at the source changed rows?

If you can't then you could create an Oracle linked server from your SQL
Server and then issue your TSQL statements just like you were using another
SQL Server.

The problem with bringing over the rows into a table at the destination and
then performing the TSQL is that if the Oracle table is large then this may
take a while.

--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.konesans.com - Consultancy from the people who know


"AW" <odgam (AT) asl (DOT) com.hk> wrote

Quote:
Dear all,
I understand this has been asked before but I don't quite understand
exactly
how to do this

The situation is
I have source data in Oracle database and the destination in MS Sql server

Suppose I have table A in both Oracle database and MS Sql server which
have
the same table stucture.

Destination MS Sql server already have some rows
Source Oracle server has the same rows (same Primary key) but updated
columns and
rows that not exists in MS Sql server

What I want to do is using DTS to update the table if same PK is found in
Destination table A, else insert the row in Table A of Destination?

I have never use DTS before so I would like to ask all detailed steps that
I
need to take in order to accomplish the above.

The other thing is I don't want to create temp tables in the destination
database to store all data and then run a store procedure to do the data
transfer. That will be my last option.

Thanks a lot.








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.