dbTalk Databases Forums  

Can you copy tables in DTS without having to drop the destination table?

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


Discuss Can you copy tables in DTS without having to drop the destination table? in the microsoft.public.sqlserver.dts forum.



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

Default Can you copy tables in DTS without having to drop the destination table? - 08-23-2004 , 10:26 AM






I wanted to know if there is a option in DTS where I can copy new data
in a table from the source DB to the destination DB without haveing to
set the "DropDestinationObjectsFirst = True"? What I want ideally to
happen is for DTS to find the changes between the two tables and copy
up only the new changes. The reason that I cannot drop the
destination is becuase replication is running on the destination DB
which will not allow me to drop any tables first. Thanks for any help
in advance.

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

Default Re: Can you copy tables in DTS without having to drop the destination table? - 08-23-2004 , 03:17 PM






In message <b8d09240.0408230726.2134b846 (AT) posting (DOT) google.com>, Tony
<ttgolfer (AT) gmail (DOT) com> writes
Quote:
I wanted to know if there is a option in DTS where I can copy new data
in a table from the source DB to the destination DB without haveing to
set the "DropDestinationObjectsFirst = True"? What I want ideally to
happen is for DTS to find the changes between the two tables and copy
up only the new changes. The reason that I cannot drop the
destination is becuase replication is running on the destination DB
which will not allow me to drop any tables first. Thanks for any help
in advance.
If you only want to copy data, then you can use a DataPump task or a
Data Driven Query Task. The latter is designed to allow insert or update
queries to be called, depending on the result of a lookup. You would
classically use the lookup to check if the row exists already in the
destination.

It is often faster to load all data into a staging table, and just use
T-SQL to perform the final insert into your main table.


--
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
  #3  
Old   
sqlguy
 
Posts: n/a

Default Re: Can you copy tables in DTS without having to drop the destination table? - 08-24-2004 , 04:31 PM



First truncate the able
Truncate table tablename
And then do the other stuff.
Have you used the enterprise manager to look at the sql behing the dts
packages. You can go to Data Transformation Services and click on
local packages. Then you can right click and click design on the
package you built. And then you can right click on every step and see
what each step is doing and change the step according to you needs.


ttgolfer (AT) gmail (DOT) com (Tony) wrote in message news:<b8d09240.0408230726.2134b846 (AT) posting (DOT) google.com>...
Quote:
I wanted to know if there is a option in DTS where I can copy new data
in a table from the source DB to the destination DB without haveing to
set the "DropDestinationObjectsFirst = True"? What I want ideally to
happen is for DTS to find the changes between the two tables and copy
up only the new changes. The reason that I cannot drop the
destination is becuase replication is running on the destination DB
which will not allow me to drop any tables first. Thanks for any help
in advance.

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.