SQL Server Error 9002 — The transaction log for database is full
The transaction log for database 'X' is full due to 'ACTIVE_TRANSACTION'.
The log file has grown to its maximum allowed size (or run out of disk space) and can't accept new log records. The reason named after "due to" tells you why old log space isn't being reused.
Common causes
- ACTIVE_TRANSACTION — a long-running or forgotten open transaction is holding old log space that can't be reused
- LOG_BACKUP — database is in Full (or Bulk-Logged) recovery model but log backups aren't being taken, so the log just keeps growing
- A large one-time operation (bulk load, index rebuild, mass delete) generating more log than the file/disk can hold
- Autogrowth disabled or capped at too small a maximum size
- Replication, Change Data Capture, or Always On availability groups holding the log for a lagging subscriber/secondary
How to fix it
- Check the real reason first: SELECT name, log_reuse_wait_desc FROM sys.databases.
- For ACTIVE_TRANSACTION: find and resolve the open transaction — DBCC OPENTRAN.
- For LOG_BACKUP: take a log backup immediately (BACKUP LOG), then set up a real recurring log backup schedule if the database is meant to be in Full recovery.
- Free disk space or add a log file if the drive itself is full — moving to Simple recovery is only appropriate if point-in-time recovery genuinely isn't needed.
- For replication/CDC/Always On causes, address the lagging consumer — the log can't truncate past what it hasn't sent yet.
Paste your error and log_reuse_wait_desc value here for a diagnosis specific to your situation.
Try error explainer free →