SharePoint Tips: SharePoint_Config_Log.ldf file size is massive

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.

Did this article help you today?

Yes, thank you :)No, sadly not :(

 

Comments

Permalink

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

Permalink

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)

Permalink

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

Permalink

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?

Permalink

Ran this and it cleared up about 300-350GB of space on an inherited SP system. Thank You for sharing and have many virtual drink and beers or whatever on me. Peace

Permalink

A W E S O M E
You, my friend, are a lifesaver.

Permalink

This is a great solution, as long as you know that you will never need to do a data recovery from the transaction logs.

Permalink

Worked for me, went from a 402 gb file, to 832 KB file. Took about 2 minutes to execute the command

Permalink

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

Permalink

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)

Permalink

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

Permalink

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?

Permalink

Ran this and it cleared up about 300-350GB of space on an inherited SP system. Thank You for sharing and have many virtual drink and beers or whatever on me. Peace

Permalink

A W E S O M E
You, my friend, are a lifesaver.

Permalink

This is a great solution, as long as you know that you will never need to do a data recovery from the transaction logs.

Permalink

Worked for me, went from a 402 gb file, to 832 KB file. Took about 2 minutes to execute the command

Permalink

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

Permalink

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)

Permalink

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

Permalink

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?

Permalink

Ran this and it cleared up about 300-350GB of space on an inherited SP system. Thank You for sharing and have many virtual drink and beers or whatever on me. Peace

Permalink

A W E S O M E
You, my friend, are a lifesaver.

Permalink

This is a great solution, as long as you know that you will never need to do a data recovery from the transaction logs.

Permalink

Worked for me, went from a 402 gb file, to 832 KB file. Took about 2 minutes to execute the command