Solved

Merge Replication subscription expiration

Posted on 2011-09-08
3
668 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
  • 2
3 Comments
 
LVL 39

Accepted Solution

by:
lcohan earned 500 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

772 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now