How to synchronize several tables in one transaction using SyncOrchestrator and SqlSyncProvider.

Answered How to synchronize several tables in one transaction using SyncOrchestrator and SqlSyncProvider.

  • 2012년 4월 4일 수요일 오후 5:10
     
     

    As far as I know there are two ways of performing synchronization between databases:

    1. Using the SyncAgent class from Sync Framework 1.0.
    2. Using the SyncOrchestrator class from Sync Framework 2.1.

    The SyncAgent class allows to use the SyncGroup class to ensure that several tables will be synchronized in one transaction.

    Is it possible to achieve same functionality by using the SyncOrchestrator and SqlSyncProvider classes? If it it possible, please describe how to do this.

    Thank you!

모든 응답

  • 2012년 4월 4일 수요일 오후 11:39
    중재자
     
     답변됨
    Scope is the the equivalent of a SyncGroup in SyncOrchestrator/SqlSyncProvider. similar to a sync group, tables in a scope are synchronized in a transaction.
    • 답변으로 표시됨 Wolf007 2012년 4월 5일 목요일 오전 3:49
    •  
  • 2012년 4월 5일 목요일 오전 3:49
     
     
    Scope is the the equivalent of a SyncGroup in SyncOrchestrator/SqlSyncProvider. similar to a sync group, tables in a scope are synchronized in a transaction.

    Thank you for response. Sync groups have a benefit over scopes. It is possible to create several sync groups and run synchronization (SyncAgent.Synchronize) once for all sync groups. Using scopes I will have to run multiple synchronizations manually (SyncOrchestrator.Synchronize). But it is not big deal.

    There is one important thing. Tables in a scope are synchronized in one transaction only when SqlSyncProvider.ApplicationTransactionSize is set to 0. Otherwise multiple transactions may be created (depending on size of data) for a scope.