I have an issue with transactional replication which leads to running out of disk space. The scenario is following.
- Database
A
is replicated to another computer via local distributor with command retention set to 24 hours (customer requirement). - Subscriber computer gets disconnected for a longer time.
- After few hours of high load undstributed commands are piling up on publisher computer causing lack of disk space.
At first I tried to limit distribution db size, but after it reached max size, the ldf file for database A
is swelling.
I wouldn't want to set limits on ldf file since it can cause database A
to stop functioning.
Is there any approach I could choose to prevent this situation? I don't care about replication failure, my primary concern is to keep the database available for clients. The perfect option would be an automatic subcription expiration if reached given number of transactions or used given disk space.