SharePoint Tips: SharePoint_Config_Log.ldf file size is massive

Aug 29, 2014 - by Andrew Reeves

I was starting to wonder why my SharePoint server was running slowly and I found that the disk space was almost completely used.

I ran WinDirStat to see which files were using all of the available space and was astonished to find the culprit was a log file called SharePoint_Config_Log.ldf. This seemed strange as our SharePoint installation is quite small. The log file was around 88% of the drive that it is stored on. This meant that we had only 5gb remaining.

In this situation a full backup was not possible to truncate the logs. Symantec Backup Exec was still backing up the databases every night though. To cure this problem, a quick little fix:
1. Open up Microsoft SQL Server Management Studio
2. New Query
3. Type in the following and press execute:

USE [master]
GO
ALTER DATABASE[SharePoint_Config] SET RECOVERY SIMPLE WITH NO_WAIT
GO
USE [SharePoint_Config]
GO
DBCC SHRINKFILE ('SharePoint_Config_Log')
GO

Database size magically down to 24mb. Server is now happy, and running better.

If you would like to know learn more about SharePoint or how it can be used to help your business book onto one of our SharePoint courses.

5 comments

  1. ransak

    I ran into this issue out of the blue and it worked perfectly. Thank you!

  2. erik

    Run this 4-5 times and it should shrink the LDF.. BACKUP LOG [WSS_Config] TO DISK = N'E:\Backup\Backup.bak' WITH NOFORMAT, NOINIT, NAME = N'$Database-Transaction Log Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10 DBCC SHRINKFILE (WSS_Config , 0, TRUNCATEONLY) DBCC SHRINKFILE (WSS_Config , 0, TRUNCATEONLY) DBCC SHRINKDATABASE(WSS_Config) DBCC SHRINKFILE (WSS_Config , 42)

  3. Anshu

    Works like a charm. Thank you.

  4. JT

    This worked great for me...much thanks!!!

  5. Jim

    It is telling me I don't have permissions on these databases, but I am the Administrator (using Windows Authentication on 2008 SQL logon) SBS services are using the Local System account to run. Is there a way to give permission to the administrator account?

Leave a reply