Full Backup Does Not Truncate Transaction Log

This discussion assumes a database Recovery Model of “Full,” which is the normal recommendation for production databases.  This setting allows the backup of the transaction log so that you can recover up to the point of failure by restoring log backups in order.  A Recovery Model of “Simple” will automatically truncate the transaction log periodically, but you are not allowed to backup the log in this mode, so you can only recover using the last database backup, which implies potential loss of transactions.  This setting is usually reserved for test or read-only databases.

Backing up the transaction log will not only backup the latest committed transactions within the log but will also truncate the log file. Truncation means that the transactions that were backed up are removed from the log file, freeing up space within the log file for new transactions.  The truth is, if you don’t backup the transaction log, it will continue to grow forever, until you run out of disk space.

New DBAs to SQL Server assume that the Full Database Backup truncates the transaction log – it doesn’t.  It does take a snapshot of the transaction log at the very end, so that transactions committed during a long-running full backup are actually backed up, too (which is quite clever), but it does not truncate the log.  Well, the long-term solution is to backup the transaction log frequently. This will keep the transaction log “lean and mean.”  But how frequent is frequent?  Well, it depends.  Generally, we try to keep the transaction log under 50% of the size of the data files.  If it grows beyond this, then we back it up more frequently. This is why, for some very active databases, we may backup the log every 15 minutes.   As I said, it depends.