Conflict in one way synchronization RRS feed

  • Question

  • I have on two PC's sqlexpress 2012 servers with two databases which must contain the same data for some (master) tables.

    I call these PC's: 1) Primary server 2) Secondary server

    Data in the master tables is only modified by a client which is always connected to the Primary server.

    I want to synchronize the master table data from primary to secondary server.

    I developed a C# service on the secondary service to perform this job: 

    Primary  = RemoteProvider, Secondary=LocalProvider

    Direction = Download

    I was badly suprised that I needed to handle conflicts (LocalUpdateRemoteUpdate, LocalInsertRemoteInsert, LocalUpdateRemoteDelete) in the ApplyChangeFailed of this service.

    I handle all these conflicts with the following code:

    e.Action = ApplyAction.RetryWithForceWrite;

    This works but I don't like it.

    Because there is no application which modifies master data in the secondary server I conclude that the sync framework causes this conflicts by the change tracking mechanism on the secondary server. Is that True?

    I don't like the change tracking tables in the secondary server database because in my opinion they are not required in this situation. I think that this change tracking causes unnecessary overhead.

    Is there a possibilty to have only change tracking in one database?

    Wednesday, March 5, 2014 9:34 AM

All replies

  • unfortunately no. it needs the tracking table not only to record what has changed, but from which replica a change came from, regardless of whether you only have one source replica.

    as to your conflict, did you have pre-existing data on the target database before you provisioned for sync?

    Wednesday, March 5, 2014 2:15 PM
  • I started with the same database as source and target database which contains pre-existing data in the master tables.

    Wednesday, March 5, 2014 2:21 PM