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.

  • miércoles, 04 de abril de 2012 17: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!

Todas las respuestas

  • miércoles, 04 de abril de 2012 23:39
    Moderador
     
     Respondida
    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.
    • Marcado como respuesta Wolf007 jueves, 05 de abril de 2012 3:49
    •  
  • jueves, 05 de abril de 2012 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.