Red Gate forums :: View topic - Two way compare
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Data Compare Previous Versions
SQL Data Compare Previous Versions forum

Two way compare

Search in SQL Data Compare Previous Versions forum
Post new topic   Reply to topic
Jump to:  
Author Message
smccloud



Joined: 04 Apr 2011
Posts: 5

PostPosted: Tue Jan 10, 2012 8:08 pm    Post subject: Two way compare Reply with quote

Hello,

I am trying to setup SQL Data Compare to do a two way compare (i.e. sync) of two databases. Basically, any changes in database 1 should propagate to database 2 and any changes database 2 should propagate to database 1. Is the only way to do this two separate projects in SQL Data Compare? I'm not seeing any way to do it with one project.
Back to top
View user's profile Send private message
james.billings



Joined: 16 Jun 2010
Posts: 1116
Location: My desk.

PostPosted: Tue Jan 10, 2012 9:30 pm    Post subject: Reply with quote

You're right, you can't do it. SQL Data Compar works on a Source > Target synchronization method, it's not bidirectional.
You'd need to run it twice to get records added in each database to end up in the other. You will also need to set a selection so that just "new" records in the source are added - otherwise the default behaviour would be to remove records from the target that didn't exist in the source.

In short - a standard one-way sync would try to make the databases identical.

You may encounter other difficulties- for instance, it won't be able to handle records that have been changed in both databases (once the first sync completes, the records will match as DB2 will be updated to match DB1, and the second sync wouldn't see any differences to send back the other way)
Back to top
View user's profile Send private message
smccloud



Joined: 04 Apr 2011
Posts: 5

PostPosted: Tue Jan 10, 2012 10:55 pm    Post subject: Re: Reply with quote

james.billings wrote:
You're right, you can't do it. SQL Data Compar works on a Source > Target synchronization method, it's not bidirectional.
You'd need to run it twice to get records added in each database to end up in the other. You will also need to set a selection so that just "new" records in the source are added - otherwise the default behaviour would be to remove records from the target that didn't exist in the source.

In short - a standard one-way sync would try to make the databases identical.

You may encounter other difficulties- for instance, it won't be able to handle records that have been changed in both databases (once the first sync completes, the records will match as DB2 will be updated to match DB1, and the second sync wouldn't see any differences to send back the other way)


The data we are syncing shouldn't cause this issue. I will go down the road where only new & changed records are synced & nothing is deleted from the target database. Thank you for your help.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group