locked
Snapshot synchronization deletes all rows in tables RRS feed

  • Question

  • Hi,

    What could cause a snapshot synchronization to delete all rows in tables in the target sqlce database?

    The code had been working fine, then stopped working after a change to the WCF service interface. After restoring the WCF service to original code, still having the problem. 
    Also, after the synchronization, the .sdf is frequently corrupt.
    Within the same applications, later upload only synchronizations appear to be working.

    Using;
    .net Framework 3.5sp1
    VS2008
    sql server 2008 express 

    • Moved by Hengzhe Li Friday, April 22, 2011 5:32 AM (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
    Wednesday, February 18, 2009 9:42 PM

Answers

  • if you are using snapshot and assumly you will use the CreatNewTableOrFail table creation option, or you take care of the deleting the data on client before sync. if you choose to change the sync direction from snapshot to downloadonly, then proper tracking metadata need to be added to the server database.

    the corrupted db seems to be a bigger problem. would you please elabrate a bit more ( a repro would be much appreciated ) on the scenario to repro it ?

    thanks
    Yunwen
    This posting is provided "AS IS" with no warranties, and confers no rights.
    Saturday, February 21, 2009 1:33 AM
    Moderator

All replies

  • Hi,
     
    I got the same. Snapshot synchronization + all rows deleted + database corrupted (bigger size but cannot select a single row). It seems to happen when i change synctable direction to downloadOnly and there is no tracking information on server sql 2005 database.



    Thursday, February 19, 2009 4:43 PM
  • Some additional info;

     I'm running into this strictly with the snapshot synchronization, but am running into additional oddities after further testing. I'm starting to wonder if this is really a synchronization problem or something else...

    What I'm seeing is that after replacing the sqlce database, the 1st time the snapshot synchronization is run, it appears to work. The 2nd time however, is when it starts acting strangely. The database (and CE application ) is on an SD card. After synchronization with the desktop database, if I copy the ce database to the desktop, that copy reflects the synchronized changes, but the database still on the card doesn't! After accessing the card database a couple of times, a message starts popping up that the database is corrupt. Once I run a repair, then the tables are empty.

    So I'm wondering if  it's something else corrupting the database, not really a problem with the synchronization...

    Will continue testing to try to nail it down; any ideas will be appreciated.

    Thanks
    Thursday, February 19, 2009 6:55 PM
  • if you are using snapshot and assumly you will use the CreatNewTableOrFail table creation option, or you take care of the deleting the data on client before sync. if you choose to change the sync direction from snapshot to downloadonly, then proper tracking metadata need to be added to the server database.

    the corrupted db seems to be a bigger problem. would you please elabrate a bit more ( a repro would be much appreciated ) on the scenario to repro it ?

    thanks
    Yunwen
    This posting is provided "AS IS" with no warranties, and confers no rights.
    Saturday, February 21, 2009 1:33 AM
    Moderator
  • A subsequent copy attempt of data from the SD card which had the .sdf file revealed data corruption in other files (cross links between xml files).

    I changed to a new SD card today, and so far (1/2 dozen tests) have not been able to reproduce either data corruption or deleted rows, so this issue (in my case anyway as opposed to eclore's post above) may have been due to a failing SD card and not directly related to synchronization.

    If I do run into it again, I'll post an update.

    I apologize if I raised a false alarm, thank you for the reply.

    Monday, February 23, 2009 7:55 PM