Monday, February 20, 2012

Large MSMerge_History, MSMerge_genhistory,MSRepl_errors tables in SQL Server 2005 Express ed

SQL Server 2005 Standard Edition act as publisher and distributor.
All subscribers are SQL Server 2005 Express Edition.
According to 2005 book online, "MSMerge_History table exists in distribution database". Howevey I found this table in Subscriber database which is in SQL Server 2005 Express Edition.
The problem is this table (MSMerge_History) and other two tables (MSMerge_genhistory, MSRepl_errors) are quite large. We want to keep SQL Server 2005 Express database as small as possible so we can put more data into it.
Is there anyway (Manually or automatically) to clean those tables in SQL Server 2005 Express? Please help.

On the subscriber typically 10 sessions worth of data are stored in MSmerge_history.

Are you running the merge agent in continuous mode by any chance? If so, the table could grow.

You can manually delete the entries in MSmerge_history and MSRepl_errors as they are for history purposes.

MSmerge_genhistory should NOT be touched. You should allow this table to be cleaned up by the merge agent. One thing that may help you is to reduce the retention period of the publication. However this has the side effect that if any subscriber comes to sync after the retention period, it will be expired and needs to be reinitialized. Choose a value that suits your needs.

|||

Thanks Mahesh. I do appreciate your help.

No comments:

Post a Comment