none
For data sync with lot of tables, what's the appropriate way to divide the tables into scopes? RRS feed

  • Question

  • We have system with multiterminals, each installed with SQL2008 R2 Express. We're using Sync Framework 2.1 to synchronize the data among the terminals. There are lot of tables (though not every column in the tables) need to be synchronized. So, we divided the tables into different scopes. Some of the tables are more independent from each other; others are dependend on each other when we try to retrieve a transaction. Currently, we've put all of the tables that are transaction related into one scope. This made this scope very big. When sync engine starts to sync periodically, we're going through each of the scopes to start the synchronize.

    My question is: can we divide this big scope into multiple smaller ones and still make sure the data integrity? Can the sync framework guarantee that all of the changes since last sync point will be synchronized to the peers before it finishes the task? We want to make sure we can retrieve the transaction with full information, not half or part of the information. If that's guranteed, then the benefit of smaller scopes is there will be smaller chunk of data to be synchronized as a whole piece, but I'm not sure.

    Saturday, May 26, 2012 12:29 PM

Answers

  • here's some stuff to consider when defining scopes: Sync Framework Scope and SQL Azure Data Sync Dataset Considerations

    you have to note that the a transaction is at the scope level, so rows from multiple tables that need to commit as a unit should be in the same scope. however, its still not guaranteed that everything will be applied thats why you have to factor in handling exceptions either in SQL or conflicts in the ApplyChangesFailed event so you can decide what to do with the failing records.

    • Marked as answer by bli88 Sunday, May 27, 2012 12:33 PM
    Sunday, May 27, 2012 2:37 AM
    Moderator

All replies

  • here's some stuff to consider when defining scopes: Sync Framework Scope and SQL Azure Data Sync Dataset Considerations

    you have to note that the a transaction is at the scope level, so rows from multiple tables that need to commit as a unit should be in the same scope. however, its still not guaranteed that everything will be applied thats why you have to factor in handling exceptions either in SQL or conflicts in the ApplyChangesFailed event so you can decide what to do with the failing records.

    • Marked as answer by bli88 Sunday, May 27, 2012 12:33 PM
    Sunday, May 27, 2012 2:37 AM
    Moderator
  • Thank you very much, JuneT!
    Sunday, May 27, 2012 12:32 PM