question

Manuelrdgz avatar image
Manuelrdgz asked

Replication huge log file

Hello to all, Got a replication issue here. I might have found the answer but I'm afraid to run it and want to check with experts first. I have transactional replication set up on SQL Server 2012 sp1. 13 publications. **Problem:** Distribution data file = 19gb Distribution log file = Ballooned to dangerous 700gb **Setup:** 1) Transactional replication setup, continuous 2) 13 publications 3) Largest database = 200 gb 4) Distributor properties: Transaction retention 0-72 hours History Retention 48 hours 5) Subscriptions all configured as pull subscriptions 6) Distribution DB recovery model simple 7) Distribution clean up: distribution job run fine in 13 min(kinda long though) 8) Agent history clean up runs fine (2 sec) 9) Expired cleanup job runs fine (17 sec) I noticed a few setup inefficiencies and recently made this change: 1) Changed each publications from "never expire" to 120 hour retention **Manually ran some diagnostics:** Segment Name Group Id Size in MB Space Used Available Space Percent Used distribution 1 19629.00 3635.81 15993.19 18.52 distribution_log 0 774523.06 741109.16 33413.91 95.69 DBCC OPENTRAN No active open transactions Manually ran EXEC dbo.sp_MSdistribution_cleanup @min_distretention = 0,@max_distretention = 72 Removed 0 replicated transactions consisting of 0 statements in 80 seconds (0 rows/sec). DBCC Loginfo Returns 1104 rows Select name, Log_reuse_wait_desc FROM sys.databasess Name Log_reuse_wait_desc distribution LOG_Backup REPLuserdb Replication Manually confirmed all data from source to subscriber has been replicated and is a match. The data is all there at the subscriber. Considering running the following command I read about in a few blogs: EXEC sp_repldone @xactid = NULL, @xact_segno = NULL, @numtrans = 0, @time= 0, @reset = 1 Then running the distribution cleanup job again or shrinking the log. Is there any danger in this,is this the right approach? THANKS!!!
replication
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Manuelrdgz avatar image
Manuelrdgz answered
After trying everything under the sun, this article helped me solve the problem: http://social.msdn.microsoft.com/Forums/sqlserver/en-US/108c083d-199a-4f20-b31c-f7a97e56ba7e/distribution-log-retation-log-is-huge?forum=sqlreplication However more investigation is needed to prevent this in the future.
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.