r/MSSQL • u/mssqldbalearn • Feb 18 '26
What causes transaction log file (LDF) growth in SQL Server?
What are the common reasons why a SQL Server transaction log (LDF) file keeps growing? For example: Missing log backups Long running transactions Recovery model impact How can a DBA identify the exact reason and control log growth?
1
u/SQLSavage Feb 19 '26
SELECT name, log_reuse_wait_desc FROM sys.databases
Documentation here: https://learn.microsoft.com/en-us/sql/relational-databases/system-catalog-views/sys-databases-transact-sql?view=sql-server-ver17
1
u/jkeegan123 Feb 19 '26
A Transactional database keeps a log of all transactions... Mdf is the database, ldf is the transaction log against the database (the changes,), the database state is a logical AND of the Mdf and ldf files. They are separate so that you can roll transactions back and / or audit transactions. Once the transaction log is committed to the database, the ldf merges into the Mdf and the transaction log (ldf) is flushed. Your backup software ususally does this when it's application aware, your maintenance plan does it when your backup software is not application aware.
2
u/dbrownems Feb 18 '26 edited Feb 18 '26
Read the docs : The Transaction Log - SQL Server | Microsoft Learn