FIX: Non-convergence or merge agent failure occurs when you use a custom stored procedure resolver in SQL Server

Applies to: SQL Server 2008 R2 Service Pack 2SQL Server 2008 R2 DeveloperSQL Server 2008 R2 Enterprise More

Symptoms


Assume that you use merge replication in Microsoft SQL Server 2008 R2, SQL Server 2012, or SQL Server 2014. When you use a custom stored procedure resolver to resolve conflicts, additional characters are added to the character type data after conflict resolution. Additionally, the merge agent may fail, and the following error may be logged in the replmerg.log file:
ERROR: ErrNo = 0x8004565a, ErrSrc = <null>, ErrType = 8, ErrStr = The Merge Agent failed because the schema of the article at the Publisher does not match the schema of the article at the Subscriber. This can occur when there are pending DDL changes waiting to be applied at the Subscriber. Restart the Merge Agent to apply the DDL changes and synchronize the subscription.

Cause


The issue occurs because of the way that the conversion of some data types occurs during conflict resolution.

Resolution


The issue was first fixed in the following cumulative update of SQL Server.

Cumulative Update 3 for SQL Server 2012 SP2

Cumulative Update 4 for SQL Server 2014

Cumulative Update 12 for SQL Server 2012 SP1

Cumulative Update 13 for SQL Server 2008 R2 SP2

Workaround


To work around this issue, use the default resolver, or use any other COM resolvers provided. If there are no provided resolvers that address your needs, you may develop a custom COM resolver instead.

Status


Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.