Partilhar via


Microsoft COM-Based Resolvers

All of the COM-based resolvers supplied with Microsoft SQL Server 2005 handle update conflicts, and where indicated, they also handle insert and delete conflicts. They all handle column tracking; most also handle row tracking. These and all other COM-based resolvers declare the types of conflict they can handle, and the Merge Agent uses the default resolver for all other conflict types.

The resolvers are installed during the installation process for SQL Server 2005. Execute the sp_enumcustomresolvers stored procedure to view all the conflict resolvers registered on a computer. Executing the procedure displays the description and globally unique identifier (GUID) for each resolver in a separate result set.

To specify a resolver

The following table describes the attributes of the specific resolvers.

Name Required input Description Comments

Microsoft SQL Server Additive Conflict Resolver

Name of the column to be summed. It must have an arithmetic data type (such as int, smallint, numeric, and so on).

Conflict winner is determined from the priority value. Specified column values are set to the sum of the source and the destination column values. If one is set to NULL, they are set to the value of the other column.

Supports update conflicts, column tracking only.

Microsoft SQL Server Averaging Conflict Resolver

Name of the column to be averaged. It must have an arithmetic data type (such as int, smallint, numeric, and so on).

Conflict winner is determined from the priority value. The resulting column values are set to the average of the source and the destination column values. If one is set to NULL, they are set to the value of the other column.

Supports update conflicts, column tracking only.

Microsoft SQL Server DATETIME (Earlier Wins) Conflict Resolver

Name of the column to be used to determine the conflict winner. It must have a datetime data type.

Column with the earlier datetime value determines the conflict winner. If one is set to NULL, the row containing the other is the winner.

Supports update conflicts, row, and column tracking. The column values are compared directly and an adjustment is not made for different time zones.

Microsoft SQL Server DATETIME (Later Wins) Conflict Resolver

Name of the column to be used to determine the conflict winner. It must have datetime data type.

Column with the later datetime value determines the conflict winner. If one is set to NULL, the row containing the other is the winner.

Supports update conflicts, row, and column tracking.

Microsoft SQL Server Maximum Conflict Resolver

Name of the column to be used to determine the conflict winner. It must have an arithmetic data type (such as int, smallint, numeric, and so on).

Column with the larger numeric value determines the conflict winner. If one is set to NULL, the row containing the other is the winner.

Supports row and column tracking.

Microsoft SQL Server Minimum Conflict Resolver

Name of the column to be used to determine the conflict winner. It must have an arithmetic data type (such as int, smallint, numeric, and so on).

Column with the smaller numeric value determines the conflict winner. If one is set to NULL, the row containing the other is the winner.

Supports update conflicts, row and column tracking.

Microsoft SQL Server Merge Text Conflict Resolver

Name of the text column and delimiter, for example, @resolver_info = '[col1][===]'.

Conflict winner is determined from the priority value. The text columns in conflict are set to the merged value, consisting of the common prefix followed by the unique part from the Publisher, then by the delimiter, and finally by the unique part from the Subscriber.

Supports update conflicts, column tracking only.

Microsoft SQL Server Subscriber Always Wins Conflict Resolver

No inputs.

Subscriber, regardless of whether it is the source or destination, is the winner.

Supports all conflict types.

Microsoft SQL Server Priority Column Resolver

Name of the column to be used to determine the conflict winner. It must have an arithmetic data type (such as int, smallint, numeric, and so on).

Column with the larger numeric value determines the conflict winner. If one is set to NULL, the row containing the other is the winner.

Supports update conflicts, row and column tracking.

Microsoft SQL Server Upload Only Conflict Resolver

No inputs.

Changes uploaded to the Publisher are accepted; changes are not downloaded to the Subscriber.

Supports all conflict types.

Microsoft SQL Server Download Only Conflict Resolver

No inputs.

Changes uploaded to the Publisher are rejected; changes are downloaded to the Subscriber.

Supports all conflict types.

Microsoft SQLServer Stored Procedure Resolver

Name of the stored procedure the resolver should call to handle the conflict.

Conflict resolution depends on the logic in the stored procedure you specify.

Supports update conflicts. For more information, see How to: Implement a Stored Procedure-Based Custom Conflict Resolver for a Merge Article (Replication Transact-SQL Programming)

See Also

Concepts

Advanced Merge Replication Conflict Detection and Resolution

Other Resources

sp_enumcustomresolvers (Transact-SQL)

Help and Information

Getting SQL Server 2005 Assistance