forums › forums › SQLyog › Sync tools, Migration, Scheduled Backup and Notifications › Disconnected Laptops & Pcs
- This topic is empty.
-
AuthorPosts
-
-
August 21, 2007 at 5:08 pm #24726
peterlaursen
ParticipantUsing a multicolumn PK specific for each host will work!
This trick was actually mentioned here too:
http://webyog.com/en/whitepapers/Using_SQL…L_Databases.pdf
But there are som limitations. If you want to DELETE you willl have to do on all computers, and you can only do UPDATE on a row on one computer between syncs.
Scroll down to the paragraph 'Making the PK host-specific' for details.
Syncing will sync complete rows (or 'records') and of course rows that are identical on the two host at sync time will of course not be touched.
-
September 27, 2007 at 11:15 am #24727
JacquesAudette
MemberHi.
I'm new to all this, as i am trying to figure out if the sync agent is what i need. I haven't yet tried it, but it's coming.
My application is quite the same as the original post.
The problem i see is that, with the modified pk as mentioned in your pdf file, is that it only protects newly created data. To protect modified data, i thought of a different scenario. Please let me know if you think it is worth it.
In the document, the two-way sync is described as a one way sync source to target followed by a one-way target to source. What if we made to distinct one-way syncs instead.
First, make a one way sync from laptop to server, with a where clause limiting the rows to the ones modified on the laptop since the last update (using a timestamp on the save).
Then, make a one-way sync from the server to the laptop with all records (or at least a longer time frame to make sure data from other laptops is read back).
Of course, no items are deleted unless deleted all machines. A valid flag in the database could be used for deleted rows.
The only drawback is that if the data was modified on both the server and the laptop, the laptop wins. But this understandable.
Please let me know if this might work.
jacques.
-
September 27, 2007 at 11:38 am #24728
peterlaursen
ParticipantI am not sure I got your point, but it makes no difference if you run two one-way syncs or one two-way sync, if only you define source and target appropirately!
A two-way sync will first sync source>target and then target>>sync.
The only difference is that with two-way it will be done for every table before proceeding to the next table.
Was I missing something?
-
September 27, 2007 at 5:12 pm #24729
JacquesAudette
MemberMy point is, if we update only the locally modified on the sync laptop to server and then sync everything from server to laptop, the old data on the laptop will not overwrite the new data on the server, as it would if we synced everything from laptop to server. But with a greater time span for the update server to laptop, we are sure to get all the changes back.
Maybe i'm looking at this the wrong way…
I'll install everything as soon as possible and work on it for a while, then the ideas might get clearer in my head…
jacques.
-
-
AuthorPosts
- You must be logged in to reply to this topic.