Reviewing replication conflicts
Occasionally the same entity or link is updated or deleted by users in different databases in such a way that a conflict occurs between the different versions of the record. Such conflicts are automatically resolved by SQL Server when they are merged in the publication database. The conflict is automatically resolved either in favor of the change that is made at the Publisher or, if the changes were made in two subscription databases, in favor of the first version to merge with the Publisher.
About this task
It is important to check for and review any conflicts regularly. To begin with, a suitable interval might be hourly, then when you know how frequently conflicts occur you can adjust the interval, for example, to once a day.
Working in the publication database, you use the Conflict Viewer to review how the conflicts were resolved by SQL Server. If required, you can change the outcome of the conflict and even edit the record to combine information from the different versions. When you complete the review by clicking Apply, any changes to the outcome of the conflict are replicated to the other sites to produce a consistent view of the data across all the sites. If there are links involved, changing the outcome of the conflict can also restore or delete links depending on the type of conflict.
- How the conflicts are displayed
-
In the Conflict Viewer, the tree view lists the entity and link types for which there are conflicts. To obtain a breakdown by type, expand the items in the tree view, and then click an entity or link type to list the actual conflicts. This record will be a modification unless DELETED or RESOLVED appears in the record label. The tree view always lists the winning version of the record. The shortcut menu that is available by right-clicking on each record, applies only to the winning version.
The Conflict Viewer does not display the total number of broken links until you click Broken Links or review the last conflict. This is because it might take some time to calculate which links are affected by the conflicts or broken as a result of changing the outcome of the conflicts.
Click Refresh or press the F5 key to update the list with any recent conflicts and to remove any resolved ones.
Procedure
What to do next
To check for broken links, click on Broken Links in the tree view.
To fix any broken links that are found:
- In the tree view, click on the broken link and then examine its details. You need to decide whether to delete the broken link or whether to keep it which will mean restoring the link end entity. You can use the commands on the shortcut menu to investigate the records further. You cannot edit any information for a broken link.
- Click:
- Remove to soft delete the broken link and leave the link end entities unchanged.
- Restore to restore any deleted link end entities so that the link is no longer broken.
If you want to leave this broken link until later, click a different broken link in the tree view.