Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

How to synchronize data between two tables in different databases Expand / Collapse
Author
Message
Posted Wednesday, December 29, 2010 1:34 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, February 14, 2011 4:02 AM
Points: 2, Visits: 6
Hi!
I have 2 different database (A and B) in a sql server 2008. Databse A has around 100 tables out of which i want to synchronize 15 tables from database A to database B. So if any addition/deletion/updation happens on those 15 tables then those entries should be updated on database B.
But here the challenge is i will have different Primary key data in source and target, i.e. lets say one row is added to Database A-Table A with pk value as 10 then when i will copy that row to Database B- Table A, PK might be auto generated and can have any value other than 10. And there might be case wheere target table will not have all the fields as of source table.
Same way i need to keep track of update and delete.

Can anybody suggest me what will be the best solution?
Post #1040148
Posted Wednesday, December 29, 2010 2:31 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 12:57 PM
Points: 7,042, Visits: 12,974
Duplicate post. Please reply here



Lutz
A pessimist is an optimist with experience.

How to get fast answers to your question
How to post performance related questions
Links for Tally Table , Cross Tabs and Dynamic Cross Tabs , Delimited Split Function
Post #1040158
Posted Thursday, December 30, 2010 11:16 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, August 29, 2013 3:04 PM
Points: 1, Visits: 22
I think you may be looking for something like this:

http://blogs.msdn.com/b/sync/archive/2008/06/25/sql-server-2008-integrated-change-tracking.aspx
Post #1041067
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse