October 12, 2010 at 12:55 pm
Hi,
I am moving my sql server 2000 database to sql server 2005, sql server 2000 database is still in production and once a while I need to copy it to 2005 server. I used import wizrd to import all tables from 2k to 2005 but it always append all data although I selected to delete records before import but it still appends records to current records. Here is the settings I use on Edit Mappings:
[UnChecked] Drop and recreate new destination tanles
[Checked] Delete rows in existing destination tables
[Checked] Enable identity insert
I want keep all identity values as is from all tables.
Can anyone please let me know why it is not deleting old records?
Thanks.
October 12, 2010 at 1:13 pm
If you're deleting all data out of the tables, why not just drop/recreate them? Drop/recreate is MUCH faster than doing a full delete on everything.
October 12, 2010 at 5:27 pm
I usually generate a TRUNCATE script outside the Wizard and run it right before copying data.
select 'truncate table ' + name
from sys.sysobjects
where xtype = 'U'
order by name
Greg
October 13, 2010 at 4:00 pm
Yes I can drop and recreate, but I have to create indexes too... and I am curious why its not doing what it ssuppose to do?
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply