Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Log Backups Failed to Truncate Log Expand / Collapse
Author
Message
Posted Wednesday, March 20, 2013 1:23 AM


SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Sunday, January 19, 2014 5:00 PM
Points: 605, Visits: 1,690
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.


Post #1433024
Posted Wednesday, March 20, 2013 1:50 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 11:47 AM
Points: 41,525, Visits: 34,442
Please read through this: http://www.sqlservercentral.com/articles/Transaction+Log/72488/


Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
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

Post #1433039
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse