locked
What is stored as “Sync Knowledge” in the database provisioned tables? RRS feed

  • Question

  • Assume I have a SqlCe client database SDF that I create from SQL database A … then I backup database A as database B.

     

    Say for testing purposes I sync the SDF against database B … can I later take that same client SDF and sync it against database A … or did I compromise the currency of the “sync knowledge” in A when I sync’d it against B?

    Wednesday, July 27, 2011 8:18 PM

Answers

  • you should perform PostRestoreFixup on Database B before you use it for synchronization. Sync Framework uses some kind of a "unique id" or "replica id" to identify each copy in the sync topology. by backing up and restoring, you may end up with having two scopes having this same id. the post restore fixup "fixes" the metadata to prevent this scenarios.

    if you have performed PostRestoreFixup on Database B, you can sync your SDF to either database A or B and database A and B can sync with each other as well.

    • Marked as answer by P H T Thursday, July 28, 2011 1:47 PM
    Thursday, July 28, 2011 1:32 AM
  • Snapshots dont need post restore fixup.
    • Marked as answer by P H T Tuesday, August 2, 2011 12:21 PM
    Tuesday, August 2, 2011 1:18 AM

All replies

  • you should perform PostRestoreFixup on Database B before you use it for synchronization. Sync Framework uses some kind of a "unique id" or "replica id" to identify each copy in the sync topology. by backing up and restoring, you may end up with having two scopes having this same id. the post restore fixup "fixes" the metadata to prevent this scenarios.

    if you have performed PostRestoreFixup on Database B, you can sync your SDF to either database A or B and database A and B can sync with each other as well.

    • Marked as answer by P H T Thursday, July 28, 2011 1:47 PM
    Thursday, July 28, 2011 1:32 AM
  • I have never stumbled across the PostRestoreFixup command!!!  Google does not return much on the command (and just about every link mentions JuneT at some point!).  The only information I have found is here: http://msdn.microsoft.com/en-us/library/microsoft.synchronization.data.sqlserver.sqlsyncstorerestore.aspx ... which is specific to SQL Server.

     

    I now understand running PostRestoreFixup on the SQL server restored database ... thanks.

    I see posts talking about running PostRestoreFixup on SQL Server Express clients ... what about after copying SqlCe SDFs around (I ask because I remember with SFx 1 the ClientID changed each time the SDF was copied...)?

    Thursday, July 28, 2011 1:47 PM
  • my mistake, it should read PerformPostRestoreFixup

    for distributing SDFs, use GenerateSnapshot instead.

    Thursday, July 28, 2011 1:54 PM
  • Snapshots will speed deployment ... but does SqlCe have to deal with PerformPostRestoreFixup issues if I don't use Snapshots?

    I am using filters ... I don't think I can use Snapshots ... ?

    Thursday, July 28, 2011 2:05 PM
  • Snapshots dont need post restore fixup.
    • Marked as answer by P H T Tuesday, August 2, 2011 12:21 PM
    Tuesday, August 2, 2011 1:18 AM