Solved

Merge Replication subscription expiration

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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
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.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

740 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