Tuesday 9 April 2013

How to reduce Sharepoint Config Log file size in Sharepoint 2010/2013

You have probably notice that after a while you space in the disk has grown when you have not done anything especial with Sharepoint. This issue is normally caused by logs. They log all the time, so even if the server is idle they have to report something.

Follow these steps to reduce the log in the Sharepoint Config database.

Step 1
Find out where you “Sharepoint_Config” Database is.

Step 2
Open the SQL 2008/2012 Server Manager Studio with the name of the server where the DB is kept.

Step 3
Select the DB, right click and open New Query:
image

Step 4
Thinking we are going to keep a backup in our R drive (change the drive depending of what you use C perhaps?), type the following and press “F5”:

BACKUP LOG [Sharepoint_Config] TO DISK='r:\configLogBackup.bak'
Step 5
Go to the DB itself, right click and go to properties. Under properties select options and recovery model, and then select simple:


Step 6
Now let’s go to Shrink the Sharepoint_Config log to 50 MB, just type the following SQL Command:

DBCC SHRINKFILE('Sharepoint_Config_Log',50)


Step 7
Once this is done we come came back to DB , right click and go to properties. Under properties select options and recovery model, and then select Full:

No comments: