9002: The transaction log for database is full due to ...
SQL ServerWhat 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.
More from this engine
- 8152String or binary data would be truncated
- 2628String or binary data would be truncated in table, column ...; truncated value
- 1222Lock request time out period exceeded
- 1105Could not allocate space for object in database because the filegroup is full
- 208Invalid object name
- 229The SELECT/EXECUTE permission was denied on the object
- 4060Cannot open database requested by the login. The login failed