Friday, August 03, 2007

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

Don't panic. This error inform that the log file for your SQL Server database is full. If you're playing with Classic ASP then the error message would be appear like this below:

Microsoft OLE DB Provider for ODBC Drivers error '80040e14' [Microsoft][ODBC SQL Server Driver][SQL Server]The log file for database 'YOURDATABASENAME' is full. Back up the transaction log for the database to free up some log space.


To solve this problem simply open Query Analyzer and then run the command below:

BACKUP LOG yourdatabasename WITH TRUNCATE_ONLY
GO
DBCC SHRINKFILE (yourdatabasename_log,0)
GO


Then, make sure that you have a backup schedule in place to prevent the log file growth from getting out of hand. Backup the database, and then shrink the transaction log to free up log space.

You can setup a new maintenance plan. Go into Enterprise Manager -> Management, right click on Maintenance plan and choose New Maintenance plan.

No comments: