Error 9002

Troubleshooting SQL Server

Troubleshooting

Error 9002

Severity Level 19
Message Text

The log file for database '%.*ls' is full. Back up the transaction log for the database to free up some log space.

Explanation

The specified transaction log file has run out of free space.

Action

To gain more space, you can free disk space on any disk drive containing the transaction log file for the related database. Freeing disk space allows the recovery system to enlarge the log file automatically. Or you can gain space by adding or enlarging a log file for the specified database.

Freeing disk space

You can free disk space on your local drive or on another disk drive. To free disk space on another drive:

  1. Move the transaction log files with an insufficient amount of free disk space to a different disk drive.

  2. Detach the database by executing sp_detach_db.

  3. Attach the database by executing sp_attach_db, pointing to the moved files.
Adding a log file

Another solution is to add a log file to the specified database using the ADD FILE clause of the ALTER DATABASE statement. Or you can enlarge the log file using the MODIFY FILE clause of the ALTER DATABASE statement, specifying the SIZE and MAXSIZE syntax. Adding an additional log file allows the existing log to grow.

See Also

ALTER DATABASE

Errors 9000-9999

Expanding a Database

Insufficient Disk Space

sp_attach_db

sp_detach_db

sp_add_log_file_recover_suspect_db