FIX:"A call to SQL Server Reconciler failed" error message occurs when you try to add or reinitialize a subscriber of SQL Server Compact 3.5 for a merge publication

Article translations Article translations
Article ID: 2479589 - View products that this article applies to.
Expand all | Collapse all

SYMPTOMS

Consider the following scenario:
  • You create a merge publication for an instance of Microsoft SQL Server 2008 R2 and add a subscriber of SQL Server Compact 3.5.
  • You add two articles to the merge publication. Then, you add a join filter between these two articles.
    Note For example, the articles are table A and table B. Then, you create a join filter that only replicates the rows of table B to satisfy the join condition with table A.
  • You insert some rows into the two articles.
  • You successfully create a snapshot for the merge publication.
  • You insert some rows into table A to make some rows of table B eligible to be replicated based on the join filter condition.
  • You try to reinitialize the subscription of SQL Server Compact 3.5, or add a new subscriber of SQL Server Compact 3.5.
In this scenario, the server agent of SQL Server Compact Edition does not initialize the subscription. Additionally, you receive the following error messages:
A call to SQL Server Reconciler failed. Try to resynchronize.
HRESULT 0x80004005 (29006)

An error occurred while reading the .bcp data file for the 'MSmerge_rowtrack' article. If the .bcp file is corrupt, you must regenerate the snapshot before initializing the Subscriber.HRESULT 0x8004563C (0)

The merge process was unable to deliver the snapshot to the Subscriber. If using Web synchronization, the merge process may have been unable to create or write to the message file. When troubleshooting, restart the synchronization with verbose history logging and specify an output file to which to write.
HRESULT 0x80045017 (0)

CAUSE

This issue occurs because an error occurs in a merge insert trigger. When a join filter is applied between two articles, a row is inserted incorrectly into the "MSmerge_contents" table. The inserted row has a lineage attribute set to 0x00.

Note The merge insert trigger is generated when the merge publication is created.

RESOLUTION

The hotfix that resolves this problem is included in cumulative update package 3 for SQL Server Compact 3.5 Service Pack 2.

For more information about how to obtain this cumulative update package for SQL Server 2008 R2, click the following article number to view the article in the Microsoft Knowledge Base:
2489362 Cumulative Update 3 for SQL Server Compact 3.5 Service Pack 2

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

WORKAROUND

To work around this issue, follow these steps:
  1. Run a query that resembles the following:
    -- create script for dummy updates:
    SELECT 'exec sp_mergedummyupdate @source_object = ''' + sma.name + ''', @rowguid = ''' + cast(cts.rowguid as nvarchar(36)) + ''''--, *
    FROM sysmergearticles sma INNER JOIN MSmerge_contents cts ON sma.nickname = cts.tablenick WHERE cts.lineage=0x00

  2. Copy the generated Transact-SQL update statement into a query window, and then execute the statement.
Note This Transact-SQL update statement does not affect the current user data in the database.

MORE INFORMATION

For more information about how to filter published data for merge replication, visit the following Microsoft Developer Network (MSDN) website:
How to filter published data for merge replication

Properties

Article ID: 2479589 - Last Review: February 14, 2011 - Revision: 3.0
APPLIES TO
  • Microsoft SQL Server 2008 R2 Datacenter
  • Microsoft SQL Server 2008 R2 Enterprise
  • Microsoft SQL Server 2008 R2 Standard
  • Microsoft SQL Server 2008 R2 Developer
  • Microsoft SQL Server Compact 3.5
Keywords: 
kbqfe kbexpertiseadvanced kbsurveynew kbfix KB2479589

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com