Solved

Merge Replication subscription expiration

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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Upgrading my SSIS package in VS 2012 6 58
how to just get time from a date 6 31
sql server query 12 23
SQL Syntax Grouping Sum question 7 24
Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
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 combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.

789 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