Full backup not emptying transaction log

  • I have a database that process a lot of transaction late at night. It is set to full recovery mode. Every night I do a full backup of the database, but the log file does not empty out. It just continues to grow and never seems to release old transactions after a backup. As a quick fix, which i don't like, I will temporarily switch recovery mode to simple->truncate log file->set recovery mode to full->then full backup of database. Any ideas why the transaction log does not empty out after a full backup and continues to grow?

    thanks

  • A full backup doesn't backup the transaction log, you need to take regular transaction log backups to make the log re-usable and stop it from growing out of control.

    Managing Transaction Logs - http://www.sqlservercentral.com/articles/Administration/64582/

    Stairway to Transaction Log Management - http://www.sqlservercentral.com/stairway/73776/

  • I recommend you read Paul Randal's blog about backup myths: http://sqlskills.com/blogs/paul/post/A-SQL-Server-DBA-myth-a-day-(3030)-backup-myths.aspx

    30-05) a full or differential backup clears the log

    No. A log backup includes all the log since the last log backup - nothing can change that - no matter whether that log was also backed up by a full or differential backup. I had a famous argument on Twitter last year and wrote this blog post as proof: Misconceptions around the log and log backups: how to convince yourself. In the FULL or BULK_LOGGED recovery models, the *only* thing that clears the log is a log backup.

  • If you're not taking log backups for point-in-time restore capability, why is the DB in full recovery model in the first place?

    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

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply