locked
Client database stopped uploading data to a server RRS feed

  • Question

  • Hello

    I'm stuck with the following issue. The issue is that some of my clients suddenly stopped to upload client-side changes to a server. They continue to download new changes made on the other clients but they do not upload anything to a server. 

    We use:

    1. Sync Framework 2.1.
    2. Collaborative scenario (WCF), SqlSyncProvider
    3. Client database is SQL Server Express and server database is SQL Server.

    We've already compared that problematic database with the other which works. There is no visible differences between them, at least in database structure.

    Here are client side sync framework traces. Trace #1. You can see that the newly created records successfully detected and uploaded to the server. This is a trace from the client with working database.

    VERBOSE, HostelSystem, 18, 12/12/2012 11:00:01:235,       Checking to see if batch producer has table watermarks available from previous sync.
    VERBOSE, HostelSystem, 18, 12/12/2012 11:00:01:236,       RelationalSyncProvider.BatchedEnum
    VERBOSE, HostelSystem, 18, 12/12/2012 11:00:01:236,       Executing Command: [BlockedBeds_selectchanges]
    VERBOSE, HostelSystem, 18, 12/12/2012 11:00:01:236,          Parameter: @sync_min_timestamp Value: 380406
    VERBOSE, HostelSystem, 18, 12/12/2012 11:00:01:236,          Parameter: @sync_scope_local_id Value: 3
    VERBOSE, HostelSystem, 18, 12/12/2012 11:00:01:236,          Parameter: @sync_scope_restore_count Value: 0
    VERBOSE, HostelSystem, 18, 12/12/2012 11:00:01:236,          Parameter: @sync_update_peer_key Value: 1
    VERBOSE, HostelSystem, 18, 12/12/2012 11:00:01:242,       Insert for row with PK: GUID = bfb2d4d5-69c6-4f9d-9340-22961438b400 on H_4
    VERBOSE, HostelSystem, 18, 12/12/2012 11:00:01:242,          UV: 0,380467 CV: 0,380467
    VERBOSE, HostelSystem, 18, 12/12/2012 11:00:01:242,       RelationalSyncProvider.BatchedEnum: Memory data cache size after reading row: 137 Bytes
    VERBOSE, HostelSystem, 18, 12/12/2012 11:00:01:242,       Insert for row with PK: GUID = 0484facc-418d-4411-90b2-374a743f691b on H_4
    VERBOSE, HostelSystem, 18, 12/12/2012 11:00:01:242,          UV: 0,380458 CV: 0,380458
    VERBOSE, HostelSystem, 18, 12/12/2012 11:00:01:242,       RelationalSyncProvider.BatchedEnum: Memory data cache size after reading row: 274 Bytes
    VERBOSE, HostelSystem, 18, 12/12/2012 11:00:01:242,       Insert for row with PK: GUID = 0ed60b20-9919-460e-830b-7428f85696b2 on H_4
    VERBOSE, HostelSystem, 18, 12/12/2012 11:00:01:242,          UV: 0,380463 CV: 0,380463
    VERBOSE, HostelSystem, 18, 12/12/2012 11:00:01:242,       RelationalSyncProvider.BatchedEnum: Memory data cache size after reading row: 411 Bytes
    VERBOSE, HostelSystem, 18, 12/12/2012 11:00:01:242,       Insert for row with PK: GUID = f7c54c5a-ccde-416f-a846-80df4d1ce055 on H_4
    VERBOSE, HostelSystem, 18, 12/12/2012 11:00:01:242,          UV: 0,380472 CV: 0,380472
    VERBOSE, HostelSystem, 18, 12/12/2012 11:00:01:242,       RelationalSyncProvider.BatchedEnum: Memory data cache size after reading row: 548 Bytes
    VERBOSE, HostelSystem, 18, 12/12/2012 11:00:01:242,       Insert for row with PK: GUID = f73ef761-06c0-42ef-8b32-8a04e8de1f43 on H_4
    VERBOSE, HostelSystem, 18, 12/12/2012 11:00:01:242,          UV: 0,380480 CV: 0,380480
    VERBOSE, HostelSystem, 18, 12/12/2012 11:00:01:243,       RelationalSyncProvider.BatchedEnum: Memory data cache size after reading row: 685 Bytes
    VERBOSE, HostelSystem, 18, 12/12/2012 11:00:01:243,       Insert for row with PK: GUID = ef791b3c-03e7-43c6-b773-de09cb5e85e2 on H_4
    VERBOSE, HostelSystem, 18, 12/12/2012 11:00:01:243,          UV: 0,380476 CV: 0,380476
    VERBOSE, HostelSystem, 18, 12/12/2012 11:00:01:243,       RelationalSyncProvider.BatchedEnum: Memory data cache size after reading row: 822 Bytes
    INFO   , HostelSystem, 18, 12/12/2012 11:00:01:243,    RelationalSyncProvider.BatchedEnum: --- End Table "BlockedBeds" ---

    And there is the trace from the client with the broken database. And it looks like the following command returns no data. But there are some just records which are not uploaded to a server. They are also presented in the corresponding _tracking table.

    VERBOSE, HostelSystem, 9, 12/12/2012 10:18:48:733,       Checking to see if batch producer has table watermarks available from previous sync.
    VERBOSE, HostelSystem, 9, 12/12/2012 10:18:48:733,       RelationalSyncProvider.BatchedEnum
    VERBOSE, HostelSystem, 9, 12/12/2012 10:18:48:733,       Executing Command: [BlockedBeds_selectchanges]
    VERBOSE, HostelSystem, 9, 12/12/2012 10:18:48:733,          Parameter: @sync_min_timestamp Value: 422495
    VERBOSE, HostelSystem, 9, 12/12/2012 10:18:48:733,          Parameter: @sync_scope_local_id Value: 3
    VERBOSE, HostelSystem, 9, 12/12/2012 10:18:48:733,          Parameter: @sync_scope_restore_count Value: 0
    VERBOSE, HostelSystem, 9, 12/12/2012 10:18:48:733,          Parameter: @sync_update_peer_key Value: 1
    INFO   , HostelSystem, 9, 12/12/2012 10:18:48:734,    RelationalSyncProvider.BatchedEnum: --- End Table "BlockedBeds" ---

    Note that these clients use the same code. I've even tested both databases on my dev computer. So I don't think that the problem is in an application. 

    I've also checked and newly created records are presented in corresponding "_tracking" tables.

    Does anybody suppose what the cause is? What could lead to such problem? Please help.



    • Edited by mvcdev Thursday, December 13, 2012 8:12 AM
    Thursday, December 13, 2012 8:10 AM

All replies

  • how did you initialize the clients? did you by any chance use a restored copy of a database on your clients?
    Thursday, December 13, 2012 8:51 AM
  • Databases were initialized using sync framework. At first I have also thought that the client side database was restored from backup but it is almost impossible. There is no way to restore client database in our application.
    Thursday, December 13, 2012 1:55 PM
  • so all clients started with DBs not provisioned?

    can you query the scope_info table between a working database and a non-working one and compare the guids for the scope?

    Friday, December 14, 2012 9:21 AM
  • Yes, clients starts with empty DB and provision it before initial synchronization.

    I've just checked broken database, two working clients and server database. All scopes in all these databases have unique GUID. No matches.

    Friday, December 14, 2012 9:39 AM