Monday, August 31, 2015

Truncating and shrinking SQL Server Log Files

If you have your SQL Server databases in Full Recovery mode, you may notice that your SQL Server Log Files will quickly grow in size.

On one of our database servers, I discovered a SQL Server Log File that was over 300 GB in size!

As you can probably guess, I needed to truncate and shrink the log file in order to recover a large amount of disk space.

Fortunately, the process is very easy as is outlined in this MSDN article: https://msdn.microsoft.com/en-us/library/ms189493.aspx

You basically have to set the database to Simple Recovery mode and then run the DBCC SHRINKFILE command.  



No comments:

Post a Comment