Sync Problem - Syncing doesn't take place all the time. RRS feed

  • Question

  • Hi

    We do syncing from a SQL server db to a .sdf.

    Onw way syncing from the server to the client using wcf.

    It happense randomly that changes made on the server does not sync to the client.

    We make a copy of the Master(server) db and make all the changes we need on the copy, and then Restore the Master(server) db with the copy.

    Can this be the reason that syncing doesn't take place all the time.


    What I also picked up is when I sync from server DB "A" to a sdf,

    copy the sdf to another location,

    and sync from a copy of DB "A"(DB "B"),

    whitch contain some changes to it that does not exist in DB "A",

    the changes does not sync. The Scopename in both DB's is the same.

    Why does this happend.








    Friday, October 21, 2011 12:24 PM


All replies

  • which provider are you using?
    Friday, October 21, 2011 4:15 PM
  • I based my sync service app on the "WebSharingAppDemo-SqlProviderEndToEnd" example, using "KnowledgeSyncProvider" as my provider.
    Monday, October 24, 2011 5:48 AM
  • ok. when you provision databases, there is an identifier for that replica to uniquely identify that copy in the sync community. when you copy databases, you effectively duplicated that id. for example, one SDF may have an Id of 1. when you sync it with the server, it stores sync knowledge for SDF with Id of 1. When another SDF having the same Id of 1 syncs, the server may think it has already received those changes since it has a record that it has already synched with the other SDF.

    for sql server databases, make sure you run PerformPostRestoreFixup on the restored database before synching again. (see: http://msdn.microsoft.com/en-us/library/microsoft.synchronization.data.sqlserver.sqlsyncstorerestore.performpostrestorefixup.aspx)

    for SDF file, if you want to distribute SDFs, use the GenerateSnaphot to generate a new SDF from an existing provisioned SDF. This snapshot SDF is specially marked so that its sync knowledge is adjusted the first you sync it. (see: http://msdn.microsoft.com/en-us/library/gg294193(SQL.110).aspx)


    Monday, October 24, 2011 6:19 AM
  • Thanx

    I will try this.

    • Marked as answer by Shaun.Butler Wednesday, November 23, 2011 5:54 AM
    Monday, October 24, 2011 7:09 AM