Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Log Backups Failed to Truncate Log


Log Backups Failed to Truncate Log

Author
Message
Fal
Fal
Mr or Mrs. 500
Mr or Mrs. 500 (522 reputation)Mr or Mrs. 500 (522 reputation)Mr or Mrs. 500 (522 reputation)Mr or Mrs. 500 (522 reputation)Mr or Mrs. 500 (522 reputation)Mr or Mrs. 500 (522 reputation)Mr or Mrs. 500 (522 reputation)Mr or Mrs. 500 (522 reputation)

Group: General Forum Members
Points: 522 Visits: 1803
I have a full recovery database used for holding logging information, typically Name, Type, Time and some other values. Each record is its own transaction and the db gets around 40 million inserts per month. The database is mirrored.

We like to keep only a few months logs in the db and have a nightly job that, for hardware reasons, deletes batches of 450 records with a 2 second waitfor during a 3 hour graveyard shift window. The job will terminate if a) it reaches the monthly limit; b) it hits the end-of-shift hour; or c) the 12 GB log file gets to less than a preset amount of free space. The following step of the job performs a log backup. This job has been running for months. There are also 4 other periodic log backups during the day.

The problem: about a week ago whilst I was "other duties as assigned" the log filled up - presumably by the batch job though I don't know for sure - and was not truncated by an log backup for 3 days, growing a further 6GB from logging inserts. The batch job ceased to execute as the log file was already full. This state appears to have been ended by a scheduled reboot of the server which flipped things over to the mirror.

The question: why did around 15 log backups never truncate the log file? At first I thought "open transactions don't get truncated" but at either 1 or 450 rows per transaction, 18GB is *a lot* of open transactions. But what else is there?


Fal.
GilaMonster
GilaMonster
SSC-Forever
SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)

Group: General Forum Members
Points: 47412 Visits: 44399
Please read through this: http://www.sqlservercentral.com/articles/Transaction+Log/72488/


Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


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