sp_mergemetadataretentioncleanup fails after installing SQL 2012 SP2

Share this Post

Unfortunately we discovered the fix for this problem was not included in SQL Server 2012 SP2 CU1 or CU2.  We anticipate the fix will be included in the next cumulative update for SQL Server 2012.

We’re testing the work around below, so far no issues.

————————————————————————
— STOP all Merge Replication synchronizations
— Execute on Published and all Subscriber databases

We’ll post more in the following technical paper:

2982019    FIX: Error when you restart the Merge Agent after you upgrade the Publisher to SQL Server 2012 SP2
http://support.microsoft.com/kb/2982019/EN-US

SYMPTOMS

Assume that you use merge replication that the Publisher is running on Microsoft SQL Server 2012 or SQL Server 2012 Service Pack 1 (SP1). After you upgrade the Publisher to SQL Server 2012 Service Pack 2 (SP2), you cannot restart the Merge Agent. Additionally, you receive the following error:

The merge process could not perform retention-based metadata cleanup in database ‘MergePub’. If this failure continues, try increasing the query timeout for this process, or try reducing the retention period. When troubleshooting, restart the synchronization with verbose history logging and specify an output file to which to write.

When you execute the sp_mergemetadataretentioncleanup stored procedure manually on the Publisher, the stored procedure fails and you receive the following error:

RESOLUTION

The issue was first fixed in the following cumulative update of SQL Server.
Cumulative Update 1 for SQL Server 2012 SP2


Share this Post

2 thoughts on “sp_mergemetadataretentioncleanup fails after installing SQL 2012 SP2”

  1. Does this some bug affect SQL Server 2014, and if so which builds does it affect / in which build is it fixed?

    Thanks

Leave a Reply to Nigel Maneffa Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.