the best way to transfer data from indexed tables

  • hello,

    i need to transfer data between two similar databases. the primary keys are all indexed and all the tables are related through them. what is the best way to transfer data and still maintain these relationships?

    thanks for any suggestions.

  • Linked Servers, DTS, BCP

  • Why not code the insert into statement, bet it will be quicker than DTS. If you need to create the destination tables, then select into. You would then have to create the keys.

  • You'll have the least amount of problems using DTS import/export wizard. Select the source server/database and the destination server/database and choose to Copy Objects and Database between SQL Server databases.

    Check all uncheck "create destination objects..." depending on your circumstances. If creating new objects at the target, I recommend including dependent objects too.

    Obviously choose to copy data but, again, replace or append depends on your circumstances.

    Uncheck "Copy all objects" and in the Select Objects dialog, just choose the tables you want.

    Uncheck "Use default options", then in the Advanced Copy Options dialog uncheck "Copy database users and database roles" but leave all the others as is.


    Cheers,
    - Mark

Viewing 4 posts - 1 through 3 (of 3 total)

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