April 27, 2017

Truncate SQL Server Log File - 2005 or 2008

To truncate log file is one thing which is different from SQL Server 2000. In SQL Server 2000, you just use Shrink to whatever file size you like. In SQL Server 2005, sometimes we cannot shrink the log file at all.

Here are two tricks to truncate log file for a database in SQL Server 2005. The work environment is MS SQL Server Management Studio. MS SQL Server 2008 appears to behave similarly.

Select option below for step by step instructions...

SQL Server 2005 or 2008 Truncate Transaction Log Options

I.  Shrink the log file size at the right time

Alternate Solution if Above Fails

II. Eliminate the log file completely