Microsoft KB Archive/811028

= PRB: You Receive Error Message: &quot;Failed to enumerate changes in the filtered articles&quot; When the SQL Server Merge Agent Fails =

Article ID: 811028

Article Last Modified on 10/3/2003

-

APPLIES TO


 * Microsoft SQL Server 2000 Standard Edition

-



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 &quot;Symptoms&quot; 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:

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

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</li></ul>

Warning: Make sure that you test your configuration before you increase the execution frequency

of the Replication Agent or modify the QueryTimeout property value.

<div class="references_section">