Reduce Sharepoint Services log.ldf Files

I had the problem that Sharepoint_Config-ID-.log.ldf grew really BIG (14GB) on a content database of 1 GB!
This caused issues where the log was taking up all the available free space on the server, not OK!

You can solve this problem by using “Shrink” command in the MS SQL Server Management Studio Express

First you need to connect to your Sharepoint 3.0 database called: \\.\pipe\mssql$microsoft##ssee\sql\query – just put this string in your “Server name” field:

\\.\pipe\mssql$microsoft##ssee\sql\query

Create full backup of all databases before continuing!

After that we should change restore mode from “Full” (this the parameter that allows .log.ldf to grow that large as transaction logs are not purged) to “Simple”:

Expand Databases, right mouse click on Sharepoint_Config… Properties, Options, Recovery model: Simple and click OK

Shrink the database procedure:

Expand Databases, right mouse click on Sharepoint_Config… Tasks, Shrink, Files in File type select Log and click OK
Your log file will become radicaly smaller. 🙂

Be sure you backup your databases before this procedure and also on a daily basis…

Good luck!

Also check:
http://geekswithblogs.net/RogueCoder/archive/2008/06/03/122588.aspx
http://www.karaszi.com/SQLServer/info_dont_shrink.asp

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