Microsoft SQL Server Log Truncation

SUMMARY

Information if backups are scheduled and running on the database but the logs are growing and eventually fill up the disk space.

ISSUE

 

Purpose

Keep the SQL Server logs from consuming all the server disk space.

Applies To

Microsoft SQL Server 2005 through Microsoft SQL Server 2014

Symptoms / Description

Backups are scheduled and running on the database but the logs are growing and eventually fill up the disk space.

Cause

Unitrends backup agent does not control the size of the log file on disk.  The Unitrends agent after a successful transaction log backup will signal to SQL Server that the backup has been completed and the log can be truncated.  There are several factors that can delay SQL Server's ability to truncate the logs so it is very important to monitor the size of the log file.  Truncating the log file DOES NOT change the size of the log.  If the size of the log has grown then a shrink operation will need to be performed to reduce the log size on disk.

Resolution / Workaround / Execution Process

To get the database log size back under control a shrink operation should be run on the database and another Transaction Log backup will need to be performed.

One way to keep the log files from growing too much is to run more frequent Transaction Log backups.  With more frequent Transaction Log backups the log is being truncated more frequently and the log doesn’t have time to grow and fill up the disk.

A second option is to run a shrink operation via a maintenance plan before a full backup is scheduled to run.

Third-Party Sources

https://docs.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-shrinkdatabase-transact-sql

https://docs.microsoft.com/en-us/sql/relational-databases/logs/the-transaction-log-sql-server

Have more questions?

Contact us

Was this article helpful?
0 out of 0 found this helpful

Provide feedback for the Documentation team!

Browse this section