Skip Ribbon Commands
Skip to main content

SharePoint Lover


SharePoint Lover > Posts > Shrinking Databases in SharePoint 2010 - Some content databases are growing too large
June 14
Shrinking Databases in SharePoint 2010 - Some content databases are growing too large

From time to time, especially when you make regular backups on your SharePoint farm, you may possibly see an alert on Central Administration saying as Follows ​"Some content databases are growing too large" and that Your Content Database is growing too large in excess of 100-200GB.

Before you jump and start deleting or reducing the sizeof your content database, then you would want to find out the following:

1. Is your content database really that large. (Surely, no one could have uploaded 100GB of data on a standard SharePoint Installation overnight).

When Content Databases grow large or when you receive a warning like this, then the likely response and action is that a site collection may have increased its size going past safe limits and the resolution is to migrate the site collection to another content database.

However, before planning to do this, you may also want to check whether your content database is actually filled up with Log Files. So, first of all, truly establish what is happening here. You can either run Powershell script to check the true size of your Web Applications Site Collection Usage by going to storage metrics i.e. Site Actions | Site Settings | Site Collection Administration | Storage Metrics or alternatively http://yourrootsitecollection/_layouts/storman.aspx

From this you'll be able to have an idea of how much space your site collection and sites are actually using as space on a web applications content database.

2. You could also run PowerShell Scripts to check the sizes of Site Collections and Web Applications visit management shell commands. At this stage, if the size of your web applications are at odds with reported size of content databases, then it might be time to shrink your content database and make some changes to the Log files on your SQL Server. Log files tend to grow during backups. Hence, check your actual database size on the SQL Server of your SharePoint Farm.


Before performing the actions below, I'd recommend you take a backup of your server farm.


- Assuming you are running SQL Server 2008. Log into the SQL Server and navigate to where the log file folder is

i.e. C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA

Locate the "YourDatabase"DB_log file and check the size. If this size i.e. exceeding the normal Site Collection site of 100GB, then thats the culprit.

-Launch SQL Server 2008 Management Studio

- Expand your databases, select the relevant Database, then right click on it, choose Properties | Options and then change the recovery mode from "Full" to "Simple".

- Next go back to the database and rick click again and select Tasks | Shrink | Files and then select File Type as "Log". On the shrink action section, select "Reorganise pages before releasing unused space" and enter a an appropriate number into the "shrink file to  to an appropriate number field and then press ok.

-Depending on the size of the log file, the log file will then be shrunk appropriately, and the offending message will be removed from Central Administration.

-On completion, please do an IIS reset on your SharePoint Server.


There are no comments for this post.