Ask the Community
Groups
Microsoft SQL Server Log Truncation - Connect IT Community | Kaseya
<main> <article class="userContent"> <h2 data-id="summary"><strong>SUMMARY</strong></h2> <p>Information if backups are scheduled and running on the database but the logs are growing and eventually fill up the disk space.</p> <h2 data-id="issue"><strong>ISSUE</strong></h2> <p></p> <h3 data-id="purpose">Purpose</h3> <p>Keep the SQL Server logs from consuming all the server disk space.</p> <h3 data-id="applies-to">Applies To</h3> <p>Microsoft SQL Server 2005 through Microsoft SQL Server 2014</p> <h3 data-id="symptoms-description">Symptoms / Description</h3> <p>Backups are scheduled and running on the database but the logs are growing and eventually fill up the disk space.</p> <h3 data-id="cause">Cause</h3> <p>Unitrends backup agent does not control the size of the log file on disk. The Unitrends agent after a successful full backup or transactional log backup will tell Microsoft that the backup has been completed and Microsoft will go in and truncate the logs but this does not affect the size consumed by the log file on disk. </p> <h3 data-id="resolution-workaround-execution-process">Resolution / Workaround / Execution Process</h3> <p>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.</p> <p>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.</p> <p>A second option is to run a shrink operation via a maintenance plan before a full backup is scheduled to run.</p> <h3 data-id="third-party-sources">Third-Party Sources</h3> <p><a rel="nofollow" href="/home/leaving?allowTrusted=1&target=https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsql%2Ft-sql%2Fdatabase-console-commands%2Fdbcc-shrinkdatabase-transact-sql">https://docs.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-shrinkdatabase-transact-sql</a></p> <p><a rel="nofollow" href="/home/leaving?allowTrusted=1&target=https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsql%2Frelational-databases%2Flogs%2Fthe-transaction-log-sql-server">https://docs.microsoft.com/en-us/sql/relational-databases/logs/the-transaction-log-sql-server</a></p> </article> </main>