Saturday, February 25, 2012

Distribution cleanup

Are transactions that have been distributed to all subscribers always stored the maximum retention period in the distribution database?

I'm using peer-to-peer replication.

No, they are stored the minimum retention period and are cleanup by the distribution clean up task. If a subscriber is offline, the transactions will be stored for the maximum retention period unless the subscriber is expired by this history retenion level.|||

But if the minimum retention period is set to 0 shouldn't all delivered transactions be cleaned up in that case.

In my peer-to-peer replication I have a publication with four subscribers and everything works fine all transactions are replicated and I don't have any latency problems.

So why is the MSrepl_commands still growing.

I can see in the output for distribution cleanup job that transactions actually are cleaned up but the MSrepl_commands grows. From time to time a the distribution cleanup job gets selected as a deadlock victim.

The size of the distribution db is now about 50GB with 100'000'000 rows in the MSrepl_commands table.

/Peter

No comments:

Post a Comment