Dealing With Stubborn Sql Server Log Files

Normally when you backup a database the log files are automatically truncated, however recently we had a development database that had racked up a 9GB log file! Despite nightly backup's the log file wouldn't clear.

In order to shrink it down to a manageable size I ran the following commands from Query Analyzer:

BACKUP LOG DBName WITH TRUNCATE_ONLY
GO
DBCC SHRINKFILE(LogFileName,SizeInMB)
GO

Now all I have to do is figure out why it get so large in the first place.

Print | posted on Monday, May 24, 2004 2:22 PM

Comments on this post

No comments posted yet.

Your comment:

 (will show your gravatar)
 
Please add 6 and 8 and type the answer here: