How to: View and Resolve Data Conflicts for Merge Publications (SQL Server Management Studio)
Conflicts in merge replication are resolved based on the resolver specified for each article. By default, conflicts are resolved without the need for user intervention. But conflicts can be viewed, and the outcome of the resolution can be changed, in the Microsoft Replication Conflict Viewer.
Conflict data is available in the Replication Conflict Viewer for the amount of time specified for the conflict retention period (with a default of 14 days). To set the conflict retention period, either:
- Specify a retention value for the **@conflict\_retention** parameter of sp_addmergepublication (Transact-SQL).
- Specify a value of conflict_retention for the **@property** parameter and a retention value for the **@value** parameter of sp_changemergepublication (Transact-SQL).
By default, conflict information is stored:
- At the Publisher and Subscriber if the publication compatibility level is 90RTM or higher. For more information about compatibility level, see the "Compatibility Level for Merge Publications" section in the topic Using Multiple Versions of SQL Server in a Replication Topology.
- At the Publisher if the publication compatibility level is lower than 80RTM.
- At the Publisher if Subscribers are running SQL Server 2005 Compact Edition. Conflict data cannot be stored on SQL Server 2005 Compact Edition Subscribers.
Storage of conflict information is controlled by the conflict_logging publication property. For more information, see sp_addmergepublication (Transact-SQL) and sp_changemergepublication (Transact-SQL).
Conflicts can also be resolved interactively during synchronization using the Microsoft Interactive Resolver. The Interactive Resolver is available through the Microsoft Windows Synchronization Manager. For more information, see How to: Synchronize a Subscription Using Windows Synchronization Manager (Windows Synchronization Manager).
To view and resolve conflicts for merge publications
Connect to the Publisher (or Subscriber if appropriate) in Microsoft SQL Server Management Studio, and then expand the server node.
Expand the Replication folder, and then expand the Local Publications folder.
Right-click the publication for which you want to view conflicts, and then click View Conflicts.
If you specified a value of 'subscriber' for the conflict_logging property, the View Conflicts menu option is not available. To view conflicts, start ConflictViewer.exe at the command prompt. By default, ConflictViewer.exe is located in the following directory: Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE. For a list of valid startup parameters, run
In the Select Conflict Table dialog box, select a database, publication, and table for which to view conflicts.
In the Replication Conflict Viewer, you can:
- Filter rows with the buttons to the right of the upper grid.
- Select a row in the upper grid to display information on that row in the lower grid.
- Select one or more rows in the upper grid, and then click Remove, which is equivalent to clicking the Submit Winner button (without making any changes to the data).
- Click the properties button (…) to view more information on a column involved in a conflict.
- Edit data in the Conflict winner or Conflict loser column before submitting the data (data is read-only if the column is gray).
- Click Submit Winner to accept the row designated as the winner of the conflict.
- Click Submit Loser to override the resolution and to propagate the value designated as the loser of the conflict to all nodes in the topology.
- Select Log the details of this conflict to log conflict data to a file. To specify a location for the file, point to the View menu, and then click Options. Enter a value, or click the browse button (...), and then navigate to the appropriate file. Click OK to exit the Options dialog box.
Close the Replication Conflict Viewer.