Click here to monitor SSC
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase

clean up of MSmerge_history Expand / Collapse
Posted Friday, February 22, 2013 9:07 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, November 30, 2016 7:04 AM
Points: 41, Visits: 645
Merge replication
SQL Server 2005 SP2

After server was restarted a couple of days ago the log for the distribution db suddenly grew and filled up the drive it was on.

After a couple of reinitializations and snapshot creations the subscriber is now synch'd with the publisher, however, the log utilization for the distribution db is constantly reaching 100%.
It looks like the activity is coming from the job "Agent history clean up : distribution".
The job is scheduled to run every 10 min but it does not complete successfully and would fail once in a while because the log is full (log size is 50 GB, db size is 20 GB).
The oldest entry in the history log is from 3 days ago so I'm thinking the job hasn't been running the past couple of months.

The query shows:
select count(*) from MSmerge_history; 46,868,507 rows

The min(time) in MSmerge_history is 2012-06-29 21:07:35.160

My question is, can we directly clean up the MSmerge_history table with a delete statement?
What are the risks?

distribution db is in SIMPLE mode.

thank you
Post #1423115
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse