July 2, 2004 at 5:08 pm
Greetings, I want to use DTS import/export to move data from a database
on our production server to the database on our development server.
The wizard inserts data into the tables on the destination server which
is fine. What I would like to do is have the wizard truncate the tables
in the destination database prior to inserting the data. Is it possible
to have the wizard do this or must I do it manually prior to mving the
data? Thanks.
July 2, 2004 at 9:33 pm
Use the SQL Task function.
You can put any SQL in there
KlK
July 5, 2004 at 7:15 am
Advanced options in the transform button will offer the option to first remove records in the existing table prior to the import.
July 6, 2004 at 4:52 am
Use a SQL Task with a Truncate Table tablename statement. Using the option to delete records in the transform data task will use a "Delete * From tablename" which, if the table is more than a few row will affect both your performance and the size of your log file.
Also, Truncate resets Identity fields so if you have an identify field it's initial value will be reset to the default. Using the Transform Data task Delete Records option will not reset the identify field and it's values will continue to grow, potentially exceeding the size of the data element.
July 6, 2004 at 9:59 am
THanks to all who replied. I will do some testing.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply