SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


clean up of MSmerge_history


clean up of MSmerge_history

Author
Message
sierra4
sierra4
SSC Veteran
SSC Veteran (273 reputation)SSC Veteran (273 reputation)SSC Veteran (273 reputation)SSC Veteran (273 reputation)SSC Veteran (273 reputation)SSC Veteran (273 reputation)SSC Veteran (273 reputation)SSC Veteran (273 reputation)

Group: General Forum Members
Points: 273 Visits: 677
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
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search