Quick Copy Question

  • Is there a simple SQL command to run that will ignore duplicate entries in the destination db when running a DTS copy?

  • Duplicate data or objects?

  • Duplicate data.  I have a single database with data that will be gradually migrated to a new database.  I need to continually migrate all of the data from the original database to the new.  The old database will continue to function and process transactions until the migration is complete.  The data on the new database doesn't need to transfer back to the original. 

  • check in the transfer options. I think you have a few options. You can either delete the data and reinsert, or append it... but I'm not sure what append means (append new or append all). If it means all, I think you'll have to redrop the data and reinsert everytime... unless that takes too much time. You'd have to create the insert query with a not exists condition to find the new rows.

  • I dn't think you have a straight forward solution for this.

     

     






    Regards,
    Sudheer 

    My Blog

  • well the straight solution, me thinks, is the create a linked server and go with insert select where not exists.

  • ...or have DTS import to staging tables, then use SQL tasks to do the INSERTs, UPDATEs, and DELETEs.

    Greg

    Greg

  • Ya.. forgot to ask if they wanted only the new data.. or the updated data as well.???

  • Yes, we're going to need to update the data as well.  How would you set up staging tables in DTS? 

    Thanks again for all the help everyone.

  • I wouldn't, drop the data and reinsert... it'll take less time than to do multiple queries to insert/update/delete.

    I've already done something like this and a straight reinsert is much faster, and much less work .

Viewing 10 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic. Login to reply