FIX: Anonymous or Local Merge Subscriber Fails with Error 8152 (319258)



The information in this article applies to:

  • Microsoft SQL Server 2000 (all editions)

This article was previously published under Q319258
BUG #: 356623 (SHILOH_BUGS)

SYMPTOMS

When an anonymous or local merge subscriber synchronizes with the publisher the synchronization is not successful because of the following 8152 error:
String or binary data would be truncated
The Merge Agent only experiences the 8152 error in the upload phase of merge synchronization. The error message can occur in one of the following three contexts:
  • The subscriber is in the process of uploading an UPDATE to the publisher.

  • The subscriber is in the process of uploading a DELETE to the publisher.

  • The publisher is proxying meta data describing an UPDATE or DELETE operation back to the subscriber.
If the error occurs when the Merge Agent is uploading an UPDATE to the publisher, the error occurs when an article's update procedure calls the sp_MSsetrowmetadata stored procedure to update the replication meta data for a particular row at the publisher.

If you open the Error Details of the Merge Agent dialog box for the failed agent, the Error message pane of the dialog box contains the following error message:
The process could not deliver update(s) at the 'Publisher'.
The Error details pane of the same dialog box contains text similar to:
The process could not deliver update(s) at the 'Publisher'.
(Source: Merge Replication Provider (Agent); Error number: -2147200989)

String or binary data would be truncated.
(Source: <Server Name>\SP2 (Data source); Error number: 8152)
					
If the error occurs when the Merge Agent is uploading a DELETE to the publisher, the failure occurs when the sp_MSdelrow merge replication system stored procedure attempts to update the MSmerge_tombstone system table.

If you open the Error Details of the Merge Agent dialog box for the failed agent, the Error message pane of the dialog box contains the following error message:
The process could not deliver delete(s) at the 'Publisher'.
					
If you open the Error Details of the Merge Agent dialog box for the failed agent, the Error message pane of the dialog box contains the following error message:
The process could not deliver delete(s) at the 'Publisher'.
(Source: Merge Replication Provider (Agent); Error number: -2147200988)

String or binary data would be truncated.
(Source: <Server Name>\RTM (Data source); Error number: 8152)
					
If the error occurs when the publisher is proxying meta data back to a local or anonymous subscriber, the failure occurs when the sp_MSproxiedmetadata merge replication system stored procedure attempts to update either the MSmerge_contents or MSmerge_tombstone system table.

If you open the Error Details of the Merge Agent dialog box for the failed agent, the Error message pane of the dialog box contains the following message:
The merge process could not apply the replication metadata.
					
The Error details pane of the same dialog box contains text similar to:
The merge process could not apply the replication metadata.
(Source: Merge Replication Provider (Agent); Error number: -2147200968)

String or binary data would be truncated.
(Source: <Server Name>\RTM (Data source); Error number: 8152)
					
NOTE: The server names referenced in the preceding error messages will be different in your environment.

To view the Error Details of the Merge Agent dialog box, connect to the server where the failed Merge Agent was running. Expand Replication Monitor, expand Agents, and then expand Merge Agents. You can either right-click the agent in which you are interested, and then click Error Details from the menu, or double-click the failed agent.

CAUSE

The maximum length of a lineage vector (MSmerge_contents.lineage and MSmerge_tombstone.lineage) is 249 bytes.

If the lineage vector for a row grows to 249 bytes in length, and that row is subsequently updated or deleted at the subscriber, there are circumstances in which the Merge Agent grows the vector to a size that is larger than that which can be stored in the MSmerge_contents or MSmerge_tombstone merge replication system tables. If the Merge Agent attempts to save the oversized vector to one of the aforementioned system tables through a SQL UPDATE statement, the update fails with the 8152 error message.

RESOLUTION

To resolve this problem, obtain the latest service pack for Microsoft SQL Server 2000. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

290211 INF: How To Obtain the Latest SQL Server 2000 Service Pack

NOTE: The following hotfix was created before the release of Microsoft SQL Server 2000 Service Pack 3.

The English version of this fix should have the following file attributes or later:
   Date         Time         Version    Size            File name
   -------------------------------------------------------------------

   03-04-2002   5:33:01 PM   8.00.593   221,768 bytes   Replprov.dll
   03-04-2002   5:33:01 PM   8.00.593   303,688 bytes   Replrec.dll
				
NOTE: Because of file dependencies, the most recent hotfix or feature that contains the files may also contain additional files.


STATUS

Microsoft has confirmed that this is a problem in Microsoft SQL Server 2000.
This problem was first corrected in Microsoft SQL Server 2000 Service Pack 3.

Modification Type:MinorLast Reviewed:9/27/2005
Keywords:kbHotfixServer kbQFE kbSQLServ2000sp3fix kbbug kbfix kbSQLServ2000preSP3fix KB319258