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

How to fix it

  1. Check the real reason first: SELECT name, log_reuse_wait_desc FROM sys.databases.
  2. For ACTIVE_TRANSACTION: find and resolve the open transaction — DBCC OPENTRAN.
  3. 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.
  4. 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.
  5. 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 →

Related