none
Synchronizing multiple SQL CE clients with one SQL Server 2008 RRS feed

  • Question

  • Hi all!,

    I am working in a system with the following configuration: n remote clients with SQLServerCE and one server running SQLServer2008. I am using SyncOrchestrator to perform the synchronisation and I found the following issue:

    - When I update in one client, after performing the synchronisation, the server is updated and works fine but the rest of the clients do not receive the update after executing the synchronisation. It is something like the clients are independent from each other and the server coordinate all the info.

    Is there a way where all clients shared all information too, in other words, all elements in the system have the same information always?.

    Thanks a lot in advance for your replies,

    Jordi DG

    Tuesday, October 12, 2010 8:14 AM

All replies

  • care to share how did you provision the clients? any filters in the scope?
    Tuesday, October 12, 2010 2:25 PM
    Moderator
  • I provision my clients like this:

    SqlCeSyncScopeProvisioning

     

    clientProvision = new SqlCeSyncScopeProvisioning(clientConn, scopeDesc);

    There isn't any filter when declaring the scope in the server.

     

    Jordi DG

    Tuesday, October 12, 2010 3:50 PM
  • hi jordi,

    can you do a quick test if the change is being selected and if Sync Fx is trying to apply it all.

    On the remote provider, create an event handler for ChangesSelected to check if the change is being picked up.

    on the local provider, create an event handler for ApplyChangesFailed to see if theres anything causing it to fail on the client.

    Tuesday, October 12, 2010 11:44 PM
    Moderator
  • Hi June,

    There is no error, nothing fails.

    I performed the synchronization following the steps in here:
    http://msdn.microsoft.com/en-us/library/ff928494(v=SQL.110).aspx

    because I was having problems with the SyncAgent and those __syncArticles table.

    I am wondering if that way of synchronization has anything to do with the problem I'm having right now.

     

    Thanks,

     

    Jordi DG

     

    Wednesday, October 13, 2010 1:42 PM
  • can you confirm that ChangesSelected picks up the change?

    if you can you post the code snippets for the provisioning and the synching, we can try to reproduce the issue.

    Wednesday, October 13, 2010 3:15 PM
    Moderator
  • This is the provisioning:

     

    SqlCeConnection clientConn = new SqlCeConnection(strLocalConnectionString);
    SqlConnection serverConn = new SqlConnection(strRemoteConnectionString);
    DbSyncScopeDescription scopeDesc = SqlSyncDescriptionBuilder.GetDescriptionForScope("QuoteScope", serverConn);
    SqlCeSyncScopeProvisioning clientProvision = new SqlCeSyncScopeProvisioning(clientConn, scopeDesc);
    clientProvision.Apply();

    And this is the synching:

     

    SyncOrchestrator syncOrchestrator = new SyncOrchestrator();
    syncOrchestrator.LocalProvider = new SqlCeSyncProvider("QuoteScope", clientConn);
    syncOrchestrator.RemoteProvider = new SqlSyncProvider("QuoteScope", serverConn);
    syncOrchestrator.Direction = SyncDirectionOrder.UploadAndDownload;
    SyncOperationStatistics syncStats = syncOrchestrator.Synchronize();

     

     

    Friday, October 15, 2010 8:02 AM
  • hi Jorgi,

    are you provisioning the SQLCE databases separately/individually or are you just making a copy of the first CE database you provisioned? can you run Sync Fx Tracing?

    Friday, October 15, 2010 11:59 PM
    Moderator
  • Hi,

    I do the provisioning separately for each SQLCE, each connect to the SQL Server individually.

     

    Thanks

     

    Jordi

    Monday, October 18, 2010 7:34 AM
  • try enabling Sync Tracing to see if it shows something.
    Tuesday, October 19, 2010 2:41 AM
    Moderator