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

Two way synchronization conflicts

forums forums SQLyog Sync tools, Migration, Scheduled Backup and Notifications Two way synchronization conflicts

  • This topic is empty.
Viewing 4 reply threads
  • Author
    Posts
    • #8488
      mwbourgeois
      Member

      I have two tables on two different database servers that are both populated from the same data sources, that I wan't to snychronize because all of the updates don't always make it to both of the servers. I've successfully used SJA to synch the two databases in a source->target format. In the event of a conflict it seems that the data on the source is chosen and the data on the target is overwritten. Is there any way to change this to be based on what the data in the conflicting field is? (Most specifically is it possible to make SJA choose the row with the more recent 'updated' column in the event of a conflict, since it is possible that the target could have more recent information than a certain row and less recent on others)

      If this is not possible with SJA can anyone recommend a pre-synch method to choose and/or update these conflicting columns?

      Thank you,

      Marc Bourgeois

    • #16056
      Shadow
      Member

      Currently you cannot do that with sja, but it's a good suggestion. Hope, it makes MAX!

      Unfortunately, I can't even think of a workaround using sja, unless the target and source dbs are updated in blocks (e.g.: s. db is updated p.m., while target is updated in the afternoons). In this case WHERE clauses can be used to select which rows to compare!

    • #16057
      Ritesh
      Member

      One workaround could be to determine the “source” and “target” using a separate query, generate the SJA XML file dynamically to swap the “source” and “target” (if required) and then run SJA.

      However, this wont give you a row level swapping option.

    • #16058
      mwbourgeois
      Member

      Sorry I forgot to check this post for so long.

      The reason I can't dynamically choose source and target is because which database is correct cannot be predicted on the whole table level. Some rows from one db server will be correct, and some from the other. I could write a script to do the synchronization by joining the tables, but that's no easy task if the tables are on seperate servers.

    • #16059
      Shadow
      Member

      Well, in this case you'll have to write a separate app to do the sync for you. It would not be a bad idea though to have a sync option that determines one or more columns and conditions that would drive the two-way sync process!

Viewing 4 reply threads
  • You must be logged in to reply to this topic.