How to skip the existing Rows from Sync RRS feed

  • Question

  • Hello,

            I want to sync two databases db1 & db2. Both of these two databases contain some of Master data which is exactly same(Master database's copies are restored). Now I configure the scope at both the databases. When I start the sync bet. these two, both the databases upload the same rows and fails at other end with conflict 'LocalInsertRemoteInsert'. I want to skip this unnecessary sync of same rows. But in future if there are any updates/deletes to these rows, those needs to be synced.

    Is there any way to do this? I tried using SqlSyncTableProvisioning.PopulateTrackingTable = DbSyncCreationOption.Skip; But is seems that it doesn't insert rows in relative _tracking tables and skips the rows from sync. But if I do Update/Delete those changes also do not sync :(.

    I have massive master data, which can take much more time of initial sync which is unneccessary.



    Friday, October 8, 2010 7:35 AM


  • check SqlSyncStoreRestore.PerformPostRestoreFixup in the docs
    Wednesday, November 17, 2010 9:12 AM

All replies

  • when you skip populating the tracking table when provisioning, there is no metadata created in the trackign table for the existing rows. Sync Fx retrieves the changes by joining the table being synched with its corresponding tracking tables.

    if the other database is just a restored copy of the original master, you can try provisioning the master only, doing a backup, restoring the backup on the other Db and then do a PostRestoreFixup.

    Friday, October 8, 2010 3:53 PM
  • Hi JuneT,

                 I tried the technique as you said. i.e. Provisioned the master database and doing backup restored the backup on the other db. But the sync framework is unable to sync the updates on the existing rows or even newly inserted records.

    You mentioned the last step as PostRestoreFixup . What exactly you want me to do?

    Please help. The initial sync is taking more than 2 days  :(




    Monday, November 15, 2010 6:40 AM
  • check SqlSyncStoreRestore.PerformPostRestoreFixup in the docs
    Wednesday, November 17, 2010 9:12 AM
  • Thanks Very Much JuneT for your valuable reply.

    It worked !!!




    Wednesday, November 17, 2010 9:55 AM