Skip Ribbon Commands
Skip to main content

Xadean's Empirical Musing

:

Quick Launch

Xadean's Empirical Musing > Posts > How to Shrink SharePoint Config DB Log File
February 28
How to Shrink SharePoint Config DB Log File

I ran into an issue with a SharePoint 2010 farm running on SQL Server 2008 R2 where the log file had grown to consume all free space on the hard disk.  The reason that the SharePoint Config DB log file grows that big is because it is in full recovery mode and no backup has been run on the database to flush the transaction logs.

Here is what I had to do in order to shrink the database:

Open SQL Management Studio and connect to database engine.  Right-click on the SharePoint Config DB, select "Tasks", and then select "Backup".  Perform a full backup on the DB.  Then right-click on the SharePoint Config DB and select "New Query".  Run the following command to shrink the SharePoint Config DB to 50 MB:

dbcc shrinkdatabase ('SharePoint2010_ConfigDB', TRUNCATEONLY)

Note: Change 'SharePoint2010_ConfigDB' to the actual name of your database.

Also an important aside is that you MUST do a backup of TRANSACTION LOGS in order to successfully truncate and shrink the size.  This will not work with a regular full backup.

 

You can check the free space available in each log file with the following query:
DBCC SQLPERF (LOGSPACE).

 

 

 

 

Comments

app

Find out everything there is to know about the weight loss product that is marketed as one of the finest appetite suppressants. <a href="https://www.fitnessguidefg.com/best-appetite-suppressant-diet-pills.html">Best place to Buy Appetite Suppressant Diet Pills</a> acan help in weight loss here my web: https://www.fitnessguidefg.com
 on 8/20/2023 1:09 PM

Add Comment

Title


Body *


CAPTCHA *

 

Attachments