You are currently offline, waiting for your internet to reconnect

Your browser is out-of-date

You need to update your browser to use the site.

Update to the latest version of Internet Explorer

SQL Server stored procedure custom conflict resolver adds "0x00" to conflicting columns

Extended support for SQL Server 2005 ends on April 12, 2016

If you are still running SQL Server 2005 after April 12, 2016, you will no longer receive security updates and technical support. We recommend upgrading to SQL Server 2014 and Azure SQL Database to achieve breakthrough performance, maintain security and compliance, and optimize your data platform infrastructure. Learn more about the options for upgrading from SQL Server 2005 to a supported version here.

SYMPTOMS
Consider the following scenario:
  • You configure merge replication in Microsoft SQL Server 2008 R2, in Microsoft SQL Server 2008, or in Microsoft SQL Server 2005.
  • The publication contains a table article.
  • The table article contains columns of data type varchar or nvarchar.
  • You configure the table article to use a stored procedure custom conflict resolver.
In this scenario, no error is returned. However, the stored procedure custom conflict resolver adds "0x00" or "\0" to the end of the strings in the varchar and nvarchar columns that are involved in the conflict. Additionally, there is no non-convergence. Therefore, both columns of data are affected.

Note The columns of data type varchar or nvarchar do not have to be involved in the conflict. For example, this issue can occur if a column of data type INT contains the conflicting change.


CAUSE
This issue occurs because the merge replication reconciler adds 0x00" or "\0" after the data is retrieved from the stored procedure.

Note The stored procedure returns the correct data.
STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.


Properties

Article ID: 2585240 - Last Review: 05/14/2012 18:54:00 - Revision: 2.0

  • Microsoft SQL Server 2005 Standard Edition
  • Microsoft SQL Server 2005 Standard X64 Edition
  • Microsoft SQL Server 2005 Enterprise Edition
  • Microsoft SQL Server 2005 Enterprise X64 Edition
  • Microsoft SQL Server 2008 Standard
  • Microsoft SQL Server 2008 Enterprise
  • Microsoft SQL Server 2008 R2 Standard
  • Microsoft SQL Server 2008 R2 Enterprise
  • Microsoft SQL Server 2008 R2 Datacenter
  • kbsurveynew kbprb KB2585240
Feedback
y>