Microsoft SQL Database File Size Reduction

If you are having problems with your server running out of hdd space and can’t figure out why, chances are your databases are causing the problem.

Don’t jump in and start deleting files there is an easy solution!

When logged into your Server Management Studio right click on any database name.

Select properties, options and set the recovery model to simple then click ok. Now right click on that database again 

Select tasks, shrink, files and set the file type to log. Then click ok.

Chances are you have just cleared out a couple of gigs worth of log data that has built up over the last few months/years.

Just be aware that the transaction log file that has been shrunk is used to back up the database but chances are you are already using some 3rd party hard drive image tool and this log isn’t really needed.

Anyway if you are concerned about the recovery models here is some light reading on SQL Server Recovery Models.

Advertisements

Published by

Alan Feekery

Developer, Gamer, Musician, Cyclist and big Motorsport fan... enjoys the odd cup of coffee :)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s