Unsupported Screen Size: The viewport size is too small for the theme to render properly.

Syncing Tables : Source Always Overwrites Target

forums forums SQLyog Sync tools, Migration, Scheduled Backup and Notifications Syncing Tables : Source Always Overwrites Target

  • This topic is empty.
Viewing 1 reply thread
  • Author
    Posts
    • #10565

      I have a MySQL 4.1 on a Linux server and a MySQL 4.1 on a client PC. I have installed the enterprise version of SQLyog and managed to replicate the server database to the PC database.

      Now I want to sync tables. The trial version allows me to choose only one table at the time, so this is what I do :

      – There is a table ACCOUNTS in the database that has a field ACCOUNT_NAME (this is not a primary key)

      – On the PC database I manually change this field for one record : say I change “customer one” to “customer x”

      – I do not sync yet

      – On the server database I change this field for another record : say I change “customer two” to “customer y”

      – I set up sync with source PC and target server

      – Run Immediately

      The result is that the source db overwrites the target db, meaning in the above example I found in both tables after sync “customer x” and “customer two”; so the sync worked only one way.

    • #25030
      peterlaursen
      Participant

      “The trial version allows me to choose only one table at the time” no .. TWO!

      “The result is that the source db overwrites the target db” This is by design!.

      Please search a little! This has been asked 100 times and replied to 100 times as well!

      Short answer: there is NO WAY a computer can tell which row is the correct one if two rows with the same PK_value exists on both hosts, it needs a 'rule' defined by a human. The only 'rule' supported at a time is “overwrites ” We plan a more advanced 'conflict resolver' for users to define their own rules.

      Also read this article:

      http://webyog.com/en/whitepapers/Using_SQL…L_Databases.pdf

Viewing 1 reply thread
  • You must be logged in to reply to this topic.