forums › forums › SQLyog › Sync tools, Migration, Scheduled Backup and Notifications › Two Way Data Synchronization
- This topic is empty.
-
AuthorPosts
-
-
March 10, 2007 at 8:58 am #10228ADL77Member
Hi,
I have a database on one computer and another on my laptop. They are identical and i want to use data synchronization with the two way option. I have my laptop as the to, and my desktop as the from. However, in the event that a record on the laptop has been updated more recently than my desktop it over writes the record with the desktop.
I would have thougth that two way schronization would somehow compare the records and keep the most up to date one, possibly with user nominating a field in each table as the update?
-
March 10, 2007 at 12:19 pm #23574peterlaursenParticipant
it does not change anything to 'hope' or guess
.. it is better to research and find the facts in whatever doumentation is available like:
http://webyog.com/en/whitepapers/Using_SQL…L_Databases.pdf.
It is written there and repeated in this Forums hundreds of times that when a row on either host has the same PK ,< source> will overwrite
. Quote:I would have thought that two way schronization would somehow compare the records and keep the most up to date one, possibly with user nominating a field in each table as the update?“somehow compare” …
There is no way for a program to tell which row is the correct one if the PK is the same but content is different!
There will need to be a “rule” defined by a human.
Currently there is only one “rule” available – and that is: “overwrites
” but of course more rules could be added.
Using
a TIMESTAMP .. ON UPDATE CURRENT_TIMESTAMP is one option,
“do nothing with that row” is another
“dublicate this row” is a third solution
– all of which could be implemented – and that is actually what we actually plan to do. We are considering how to build a user configurable 'conflict resolver' for such situations.
However the TIMESTAMP solution (and more sophisticated solutions) will require that the user has privileges on one on more servers that he might not have. So I would say what we currently do is the basic solution. Only SELECT, INSERT, UPDATE and DELETE privileges are required for the user.
-
March 10, 2007 at 10:24 pm #23575ADL77Member
Thank you peter.
I think if you go the user definable way, the user could select the field against the table when they select what tables are being syncronized. I had already included update dates in my tables which change programmatically.
If you want a crash test dummy feel free to contact me.
-
-
AuthorPosts
- You must be logged in to reply to this topic.