DBAtlas · Database operations atlas

9002: The transaction log for database is full due to ...

SQL Server

What does it mean?

The database's transaction log file is full and new transactions cannot be logged. The database rejects writes and may behave as if it were read-only.

Why does it happen?

No log backups in the FULL recovery model, a long-open transaction, replication/AlwaysOn lag, or the log being unable to grow (autogrow disabled or disk full). log_reuse_wait_desc shows the reason.

How to fix it

Check log_reuse_wait_desc in sys.databases. If it is LOG_BACKUP in the FULL model, take a log backup (BACKUP LOG). If it is ACTIVE_TRANSACTION, find the open transaction and commit/roll it back (DBCC OPENTRAN). Free disk space or fix the log file's autogrow setting. If the log really has grown, shrink it with DBCC SHRINKFILE after the backup. If you do not need the log chain, review the recovery model.

Open in DBAtlas →

More from this engine