Solved

Merge Replication subscription expiration

Posted on 2011-09-08
3
695 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
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
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.
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…
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.

786 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