none
Push all client data to server regardless of what is on the server (overwrite the server). RRS feed

  • Question

  • I have my sync all set up, and working very well.  There are times that I would like the option to not sync, but have the client overwrite all data on the server (everything on the server is removed or updated, everything from the client is put in it's place), regardless of the state of synchronization.

    Is there a way to tell the syncOrchestrator to push all client rows to the server?

    Scenario:  I have saved off multiple CE databases, but usually work from the latest one.  It sync changes to and from the live server.  One day I want to roll back to a previous CE database.  The sync will, as I have it set up now, overwrite the old CE with the new server data.  I want all of the OLD CE data to be pushed up to the server ignoring sync state.

    Thanks, 

    Brian


    GreatBigGiantBrain
    Friday, January 21, 2011 9:46 PM

Answers

  • assuming you cant drop the db if only part of the tables are being synched,  try deprovisioning the scope on the server, delete all rows on the corresponding tables, reprovision, then sync.

    as Yunwen mentioned the performance will be similar to an initial synch.

    Thursday, January 27, 2011 2:43 PM
    Moderator

All replies

  • a quick workaround is to do dummy updates on the old ce data and specifying RetryWithForceWrite to force the changes to be applied.
    Sunday, January 23, 2011 1:55 PM
    Moderator
  • Thanks.  I had not thought of that workaround.  I'll try it.  

    I was wondering with this method will rows that are not in CE be deleted on SQL?

     

    On a related note, is there a way to manually change the provision tables to tell SQL that it need to update everything from CE?  (would this run into the same problem with rows in SQL still existing after the CE update that are not in CE?)

     

    I'll give your idea a try,

    Thanks,

    Brian


    GreatBigGiantBrain
    Sunday, January 23, 2011 2:57 PM
  • That did not seem to do what I wanted it to do.  Rows that do not exist on the client are left on the server.

     

    It seems like such a simple thing.  Just push all client data to the server, exactly as it looks on the client.  I tried messing around with the sync tables to trick it into thinking the client was new, but either I dont know what to do correctly there, or it doesnt work.

    Maybe a different way to say it is:  I want to snapshot the CE database to the server?

     


    GreatBigGiantBrain
    Monday, January 24, 2011 2:28 PM
  • since at this stage, you won't know what extra rows on the server unless you diff the table,  one thought on this is to drop the server db and recreate one as the new replica from the SqlCe DB. however, please keep in mind this way is probably won't perform well depending on how much data you will be push up to the sql server. please consider this also when you evaluate the workarounds.

    thanks

    Yunwen


    This posting is provided "AS IS" with no warranties, and confers no rights.
    Tuesday, January 25, 2011 10:08 AM
    Moderator
  • assuming you cant drop the db if only part of the tables are being synched,  try deprovisioning the scope on the server, delete all rows on the corresponding tables, reprovision, then sync.

    as Yunwen mentioned the performance will be similar to an initial synch.

    Thursday, January 27, 2011 2:43 PM
    Moderator