FIX: SQL Server Merge Replication Agent Fails with Error Message 2812: "Could not find stored procedure" (308743)



The information in this article applies to:

  • Microsoft SQL Server 2000 (all editions)

This article was previously published under Q308743
BUG #: 353747 (SHILOH_BUGS)

SYMPTOMS

If Merge Replication is configured so that the Snapshot Agents connect to the Publisher by using a login that is defined as a member of db_owner (and not a system administrator) in a database that is merge published, if conflicts are detected during the Merge Process the Merge Agent fails with this error message:
Error Message : The process could not log conflict information.
Error Details : The process could not log conflict information. (Source: Merge Replication Provider (Agent); Error number: -2147200992)
---------------------------------------------------------------------------
Could not find stored procedure ''.
(Source: <publishing servername> (Data source); Error number: 2812)
---------------------------------------------------------------------------
The same error message occurs if the Snapshot Agent uses the -PublisherLogin parameter to specify a login that belongs to the db_owner role in the published database that is not a system administrator.

CAUSE

If SQL Server detects conflicts during the reconciliation process, the Merge Agent uses a stored procedure that SQL Server creates during the snapshot process to log the conflicts into the conflict table.

If the conditions described in the "Symptoms" section are true, the Snapshot Agent is not creating the stored procedure, which then causes the error to occur.

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

WORKAROUND

To work around this behavior, run the Snapshot Agent with the -PublisherLogin parameter and specify a login. For example, use the sa login, which is a system administrator on the Publisher to generate a new snapshot. After the snapshot completes, SQL Server creates the conflict stored procedure. Then, you can rerun the Merge Agent so that SQL Server can log the conflicts. Because you are not reinitializing the subscription, SQL Server does not apply the new snapshot to the subscribers.

WARNING: Do not reinitialize the subscriptions before you run the Snapshot Agent. If you reinitialize the subscriptions before you run the Snapshot Agent, you force the new snapshot to replicate to the subscribers.

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 2.

Modification Type:MajorLast Reviewed:10/16/2003
Keywords:kbbug kbfix KB308743