0

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

Came in this morning to find this error on our main database. Seen this before but didn’t think anything of it as cleaning out some HDD space on the server seemed to resolve it in this past. This time however I decided to put in a bit more effort in order to prevent this happening again. I’ve known you can shrink log files for a while but not known how. Here’s how you do it:

BACKUP LOG <DB_NAME> WITH TRUNCATE_ONLY
GO
DBCC SHRINKFILE (<DB_NAME_LOG>,0)
GO

That is literally all there is to it. Make sure you parse check your syntax before you hit the go button.

  • This has been tested on MS SQL Server 2000.

Jason Edwards