# SQL Server Error 9002: The transaction log for database is full

**Code:** `9002` · **Category:** SQL · **Seen on:** SQL Server, Windows

The log file can't grow, so writes stop until space is freed.

## Meaning

Check `log_reuse_wait_desc` in `sys.databases`: LOG_BACKUP (take a log backup), ACTIVE_TRANSACTION (end the long transaction), REPLICATION, AVAILABILITY_REPLICA. Switch to SIMPLE recovery only if point-in-time recovery isn't needed, and free disk space.

## Common causes

- FULL recovery without log backups
- Long open transaction
- Disk full or log MAXSIZE reached
- Replication/AG holding the log
- Huge bulk operation

## Quick fix

1. `SELECT log_reuse_wait_desc FROM sys.databases`
2. Back up the log: `BACKUP LOG db TO DISK=...`
3. Commit/kill the old transaction and free disk

## Detailed fix by platform

### SQL

1. `SELECT name, recovery_model_desc, log_reuse_wait_desc FROM sys.databases;`

## How to diagnose

1. **log_reuse_wait** — Which?
2. **Log backups** — Running?
3. **Disk** — Free?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/sql/mssql-transaction-log-full-9002)
