question

sand143eep avatar image
sand143eep asked

database insert

Hello All, i have 2 databases which are having the same schemas and tables, and these are in 2 different environments updates are happening continuously on both dbs. i need to insert the complete data of database 1 in to database 2 and the database 2 data should remain same and database 1 data should be inserted in to db2 is it possible i am in deep trouble please help.
sql-server-2008sql-server-2005database
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Grant Fritchey avatar image
Grant Fritchey answered
Is there a way to differentiate between what is in Database 1 and Database 2? If not, the only way I know is to walk through each table and do an insert. But then, the real question is, what do your primary keys look like? Is it at all conceivable that a value in Database 2 could be the same as a primary key in Database 1? Say, you were indexed on (bad example I know) address or government id number? Then you've got no way to do it at all.
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.