SQL Server Developer Center > SQL Server Forums > SQL Server Replication > When does changing retention period in Merge publication take affect?
Ask a questionAsk a question
 

AnswerWhen does changing retention period in Merge publication take affect?

  • Tuesday, November 03, 2009 5:25 PMKevinJK Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I have a merge publication at our head office that syncs with remote sites every 15 minutes. Throughout the year the remote sites can go offline for weeks or even months as the remote sites are not always in use due to business reasons. (power is cut so server is down).

    Since we do not know how long the server will be shutdown, I extend the retention period as the weeks go by. I make this change when the remote server is powered down. When the remote server is powered up and connects, will it update this retention period and not delete any metadata before the sync occurs?

    Right now I am getting an error on the remote server "The Merge agent failed after detecting that retention-based metadata cleanup has deleted metadata at the subscriber ......."

    All SQL Servers are at 9.0.4035. The merge agent for the subsciber is located at the subscriber(pull).

    thanks

Answers

  • Monday, November 09, 2009 10:56 PMWanwen Qi [MSFT]MSFTUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    Yes, the new retention period will take effect. However, it is recommended if you need to change the publication retention value, reinitialize the Subscriber to avoid the non-convergence of data.

    Please refer to
    SQL Server 2005 Books Online (November 2008)

    How Merge Replication Manages Subscription Expiration and Metadata Cleanup

    http://msdn.microsoft.com/en-us/library/ms151778(SQL.90).aspx

    "If, after a clean up, the publication retention period is increased and a subscription tries to merge with the Publisher (which has already deleted the metadata), the subscription will not expire because of the increased retention value. However, the Publisher does not have enough metadata to download changes to the Subscriber, which leads to non-convergence."



    This posting is provided AS IS with no warranties, and confers no rights
    • Marked As Answer byKevinJK Tuesday, November 10, 2009 2:29 AM
    •  

All Replies

  • Monday, November 09, 2009 10:56 PMWanwen Qi [MSFT]MSFTUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    Yes, the new retention period will take effect. However, it is recommended if you need to change the publication retention value, reinitialize the Subscriber to avoid the non-convergence of data.

    Please refer to
    SQL Server 2005 Books Online (November 2008)

    How Merge Replication Manages Subscription Expiration and Metadata Cleanup

    http://msdn.microsoft.com/en-us/library/ms151778(SQL.90).aspx

    "If, after a clean up, the publication retention period is increased and a subscription tries to merge with the Publisher (which has already deleted the metadata), the subscription will not expire because of the increased retention value. However, the Publisher does not have enough metadata to download changes to the Subscriber, which leads to non-convergence."



    This posting is provided AS IS with no warranties, and confers no rights
    • Marked As Answer byKevinJK Tuesday, November 10, 2009 2:29 AM
    •  
  • Tuesday, November 10, 2009 2:29 AMKevinJK Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Thanks so much for your help!