Merge Replication - Handling conflicts between multiple subscriber in different country RRS feed

  • Question

  • Team,

    Currently we have single SQL server in one region, we are planning to expand the servers based on the traffic. ex. UK, US and other country.

    But as it is single database replicated at both the ends. can i create a colum with date and time in UTC format and  when i update any column in the same row it will update the UTC-COLUMN with the latest time stamp.

    Let us say we have database ABC replicated between 2 servers. there are 4 columns
    1 - PrimaryKey
    2 - First Name
    3 - Last Name
    4 - UTCDatetime
    When i updated the 2nd Column with name Aquib and 3rd column with Qureshi and the time of data update in the UTCDatetime column.
    at the same time on other member someone updated the First Name as John and Last name as wick in the same primary key.
    also we have updated the timestamp in the UTCDatetime.
    if we have "Microsoft SQL Server DATATIME (Later Winds) Conflict Resolver" in place it will compare the UTCDatetime on both the column and which is the latest one will win and update both the First Name and Last name on other server.

    Can i achieve this using the conflict resolver?

    • Edited by Qureshi Aquib Thursday, July 12, 2018 10:32 AM added example
    Thursday, July 12, 2018 10:05 AM

All replies

  • Hi Qureshi Aquib,

    According to your description, you have a column with the UTCDatetime, and you want to use the "Microsoft SQL Server DATATIME (Later Winds) Conflict Resolver" to let it win the conflict when it has the latest UTC time.

    "Microsoft SQL Server DATATIME (Later Winds) Conflict Resolver" can meet this requirement, it will determine the conflict winner based on the column with the later datetime value.

    Best Regards,


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, July 13, 2018 9:25 AM
  • So the only thing I have to modify in my table is to add datetime column and configure the COM conflict resolver of Microsoft. It will do its thing and whenever any conflicts occur in any of the column in the row then it will see the datetime column and then only the later one wins? 
    Friday, July 13, 2018 12:30 PM
  • This is correct. If any columns between the publisher and a subscriber, or between multiple subscribers is changed between synchronizations; the changed row with the most recent datetime column value will win the conflict and be persisted everywhere.

    You need to ensure that you are using row level conflicts 

    • Proposed as answer by Teige Gao Wednesday, July 18, 2018 8:03 AM
    Monday, July 16, 2018 5:23 PM