Solved

Merge Replication subscription expiration

Posted on 2011-09-08
3
729 Views
Last Modified: 2012-06-21
Hi,

Using merge replciation single distributor/publisher running lots of articles. B it confused though and still quite new to replication.

the publication expiration is set to 1 month, however the msmerge_gen history has data in it ( alot) going back to mid april circa 4 months? This is now up to over 20 mil rows and so performance is unsurpisngly poor.

I need to know why the data is now being purged, sys.sp_mergemetadataretentioncleanup appers to be firing after each merge, idera is reporting long CPU times pretty regularly but the table keeps growing.

Please advise as not sure how to proceed

Jay
0
Comment
Question by:slam69
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 40

Accepted Solution

by:
lcohan earned 500 total points
ID: 36505325
Hopefully you'll find your answer at link below:

http://blogs.msdn.com/b/mangeshd/archive/2009/10/02/sp-mergemetadataretentioncleanup-not-cleaning-merge-metadata-during-regular-sync-causing-stale-data-in-metadata-tables.aspx


I never used the retention for the publication just because it can have a huge negative inpact in performance but for the subscription to the publication (for obvious reason! if you don't update it is out of date) and you should look at details from articles below to understand how it works:

How Merge Replication Manages Subscription Expiration and Metadata Cleanup
http://msdn.microsoft.com/en-us/library/ms151778(v=sql.90).aspx

and I would rather switch to "How to: Set the Expiration Period for Subscriptions (Replication Transact-SQL Programming)"
http://msdn.microsoft.com/es-es/library/ms147339(v=sql.90).aspx

in order to force the clients to syncronize.

Maybe your publication is a re-publication and then the answer is at the link above or Maybe subscribers(s) didn's synced data from publisher.





0
 
LVL 25

Author Comment

by:slam69
ID: 36508728
First article is just what i need,. I need to plan it in for out of hours which should be this weekend so if its ok i wil leave question open until Monday

Thx for your help

Jay
0
 
LVL 25

Author Closing Comment

by:slam69
ID: 36534888
Worked like a charm. New subscription set used to take 14 hours now takes 58 minutes so ill mark that a success :)

Thx

Jay
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question