How to shrink SharePoint_Config DB

Hi all,

I had one of my SharePoint Configuration database for one of my sharepoint sites reached 122 GB since i had a problem on having any operation from the FE server to the DB server.

My installation for the DB server is SQL 2008, the problem is the transaction log is too large and to minimize or shirnk the size, here is the steps:

1) Take a full backup from your database – Important.
2) Change the DB recovery model to Simple ( Right click on the SharePoint_Config and click on properties -> Options – > Recovery model : change it to simple.

3) Open a new query in the management studio and write this shrink command:

DBCC SHRINKFILE(‘Sharepoint_Config_Log’,1)

4) Check the HD free space, your free space on the HD has been updated.

5) Don’t forget to return back the recovery model to full for any future backups.

Check the transaction log file (ldf file of the sharepoint_config) it has been shrinked to the minimum size.

In my case the transaction log has been shrinked from 122GB to 2MB.

Hope this helps.

Regards,
Mostafa arafa

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>