Professional Documents
Culture Documents
How To Resolve The "Transaction Log File Full" Issue
How To Resolve The "Transaction Log File Full" Issue
Every SQL Server database has a transaction log that records all transactions
and the database modifications made by each transaction.
How to troubleshoot?
SELECT name,log_reuse_wait_desc
FROM sys.databases
DBCC SQLPERF(logspace)
DBCC Opentran
Note: SQL Server itself actually tells us what is going on with the log files in
the log_reuse_wait_desc column of the sys.databases catalog view.
USE [AdventureWorks]
GO
DBCC SHRINKFILE (N'AdventureWorks2014_Log' , 0, TRUNCATEONLY)
GO
• Make sure that you are using the proper recovery model for the database(s)
• Make sure that the log file auto grow settings are not based on percentage but
based on number of MB
• Make sure that you have in place a proper backup procedure for database and log
backups
• Make sure that you have in place log file shrink operations, especially in cases
where the log file can become hugle
• Have in place an automated monitoring and notification process for all disk
drives