Running the SBS 2008 BPA, you receive a warning item that states:

The log file for the Windows SharePoint Services configuration database is larger than 1 GB in size. For information about how to reduce the size of the log file, see the Knowledge Base at http://go.microsoft.com/fwlink/?LinkId=159745.

SQL Config Log Warning in BPA

SQL Config Log Warning in BPA

If you follow the link, Microsoft explains how to make a SQL script that will trim your database. My problem was that even after trimming the database, it was still over 1Gb in size- 1.4Gb actually. Let’s solve this.

This is not a permanent solution, but rather a solution to temporarily shrink the log files. They will eventually build back up- I plan to execute this plan when ever I get the warning.

Also note that doing this process will make the database temporarily “Full Recovery” only. which means that if you use differential backup and recovery, after this process takes place you can only do a full recovery untill the log files build back up over transactions.

Perform a full server backup.

Now check the size of the database.

Log into your Microsoft##SSEE Database (Windows Internal Database).

By entering \\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query as your server name. Select Windows Authentication. Click Connect.

Connect to Microsoft##SSEE

Connect to Microsoft##SSEE

You will see several databases- we will be working with the one titled Sharepoint_Config_#########.

Databases

Databases

Right click on that database and select Properties. You will see two numbers for Size and Space Available. Look at the size. Mine was 1449 Mb. I ran the Microsoft suggested SQL script, and it was still the same size. So here is what to do.

Under the options tab of the database properties, change the Recovery Model dropdown from Full to Simple. This tells SQL to truncate the log files, meaning only a full recovery is available.

Recovery Model: Simple

Recovery Model: Simple

Click Ok.

Now Run the logshrink.sql to trim the database. You can do this through a command prompt by running command:

sqlcmd -S \\.\pipe\mssql$microsoft##ssee\sql\query -E -i
 
-or-
 
You can double-click logshrink.sql. It will ask you to log in, use the same information as above. Above the window that opens, click Execute.
Execute Script

Execute Script

 

Now go back into the Properties of the config database, click Options, and change Recovery Model back to Full.

Trimmed Database

Trimmed Database

You should see your file size WAY smaller now, happy shrinking.