PRB: You Receive Error Message: "Failed to enumerate changes in the filtered articles" When the SQL Server Merge Agent Fails (811028)



The information in this article applies to:

  • Microsoft SQL Server 2000 (all editions)

SYMPTOMS

When merge replication is set up with a JOIN filter, the Merge Agent may fail to
replicate the data and the output file may contain the following error message:

Processing article 'Article_1'
Percent Complete: 5
Downloading data changes to the Subscriber
Failed to enumerate changes in the filtered articles. Percent Complete: 0 Failed to enumerate changes in the filtered articles.
Percent Complete: 0
Category:NULL
Source: Merge Replication Provider
Number: -2147200925
Message: Failed to enumerate changes in the filtered articles.
Percent Complete: 0
{call sp_MSsetupbelongs(?,?,?,?,?,1,?,?,1,?,?,?,?)}
Percent Complete: 0
Category:COMMAND
Source: Failed Command
Number: 0
Message: {call sp_MSsetupbelongs(?,?,?,?,?,1,?,?,1,?,?,?,?)}
Percent Complete: 0
Category:SQLSERVER
Source: MDPKB2E068
Number: 0
Message: The merge process timed out while executing a query. Reconfigure the QueryTimeout parameter and retry the operation.


CAUSE

During the download phase of the merge replication process, you may receive
the error message mentioned in the "Symptoms" section. To process the filtered changes, the
Merge Replication Agent executes the sp_mssetupbelongs
stored procedure. This stored procedure enumerates the changes that must go to each of the
subscribers. While processing the filtered changes, the Merge Replication Agent may timeout

Possible causes for the timeout are:
  • Index de-fragmentation.
  • Lack of unique key parameters in the JOIN filter.
  • Large system tables related to merge replication. For example, tables such as
    MSmerge_tombstone that store the updates performed on the tables or database
    involved in replication.

WORKAROUND

To work around this problem, follow these steps:
  • Rebuild the indexes on the tables that are replicated.
  • Increase the execution frequency of the Replication Agent to make sure that the
    metadata is cleaned up and that the size of the system tables is small.
  • Increase the QueryTimeout property of the Merge Replication Agent profile.
    To modify the QueryTimeout property, follow these steps:

    1. Select the existing Merge Agent profile to modify or create a new agent profile.
    2. Increase the value of the QueryTimeout property.
    3. Set the Merge Agent profile from step 1 as the default profile for the Merge Agent.

    For information about how to create a new Merge Agent profile, or to modify the existing
    Merge Agent profile, visit the following Microsoft Web site:

    How to create a replication agent

Warning: Make sure that you test your configuration before you increase the execution frequency
of the Replication Agent or modify the QueryTimeout property value.

REFERENCES

For information about how to use SQL Server 2000 to perform scalable, high-performance
merge replication applications, visit the following Microsoft Web site:

Diagnosing and Troubleshooting Slow Partitioned Merge Processes

For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

315521 INF: How to Troubleshoot SQL Server Merge Replication Problems


Modification Type:MajorLast Reviewed:10/3/2003
Keywords:kberrmsg kbprb KB811028 kbAudDeveloper