SBS 2008 / 2011 Disk Space Eaten Up By SharePoint SQL Log Files – How To Reduce The Log File Size

Having been asked to look at an SBS 2008 server with a 74gb C: drive partition that was regularly running out of space (4.5Gb left when I checked this morning) and after freeing up whatever I could using the usual methods of disabling WSUS log files and clearing out old logs etc using the following article:

http://blogs.technet.com/b/sbs/archive/2010/03/02/recovering-disk-space-on-the-c-drive-in-small-business-server-2008.aspx

I decided to see if there was something more that I could do that was slightly more permanent.

I downloaded Windirstat from Sourceforge and installed it onto the server and let it scan the C: drive of the server.

When it had finished scanning, I noticed that by far and above the largest amount of data on the C: drive was being eaten up by the Sharepoint Config SQL Database Log File – amounting to about 24Gb of disk space!  What the heck?

A quick poke around the internet landed me on the following link:

http://luka.manojlovic.net/2008/06/15/reduce-sharepoint-services-30-logldf-files/

Which allowed me to reduce the overall log files size to about 500Mb and the C: drive of the server now has a more satisfactory 27.9Gb of free space and is no longer sending me errors about the disk space running low, which is always welcome.

One slight issue I had when trying to look at the properties of the Database to change the Recovery Model to Simple was a lack of permissions and an error, but a quick search again landed me on this page:

http://www.sqldbadiaries.com/2010/08/24/property-owner-is-not-available-for-database/

Now I am by no means an SQL Guru, but I managed to work out how to change the Database Owner from NULL to SA by right-clicking on the Sharepoint_Config…………….. Database and choosing New Query.  Then just type sp_changedbowner ‘sa’ and press F5 to execute the command and bingo, the database owner has been changed and you can now look at the Database properties without seeing an error and thus you can complete the shrinking of the Log Files.

Hope that this frees up tons of space for you too.

Alan

6 Responses

  1. Thanks. This was very helpful.

  2. Cheers Alan, very informative!

  3. THANK YOU! You just saved my bum, had 20 MB left, the logfiles had eaten up 40 GB, this is a perfect solution 🙂

  4. Thank you! My client was down to 450mb of free space on C:. Your very well written fix saved my bacon.

Leave a comment