Combine 2 similar SQL databases

  • I have 2 SQL databases with over 100 tables that I would like to make one. Complications are that they would have the same primary keys for the tables due to most of them being autonumbered. Is there any trick or utility that could make this less painful and still maintain the integrity of the database for software interaction?

    Thanks,

    Robb

  • I saw a sql data compare tool in an advertisement in my email. I'll go see if i can find it. Never used it myself.

    As long as you dont have to keep the identity values the same it may be fairly easy. If you have mis-matched TypeIDs or IDs though there will be some manual tinkering needed unless this tool can magic it.

    Found them, but not sure which is the one i saw. http://www.red-gate.com/SQL_Data_Compare.htm

    I just did a search for 'sql data compare' on google.

  • No easy way if you'd have same pkeys in both db's. You'd have to change them in one or the other - or add an additional column to make it multi-part. Maybe...if you had cascading updates in place you could update the pkey and let it rain down. Just have to decide how much effort is it worth?

    Data Compare is nice, but no magic - wont change the keys for you.

    Andy

    http://www.sqlservercentral.com/columnists/awarren/

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

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