SharePoint Experts, Information Architects, Expert Witness

SICG provides a broad array of business and technology consulting from architecture to design to deployment of global systems with a focus on surfacing data in the enterprise. We focus on the "How", not just the possible. Contact me direct: or call 704-873-8846 x704.

Search This Blog

Tuesday, April 19, 2011

SharePoint 2010 - Database has large amounts of unused space

In most installations, you'll get this message after a few days (or sometimes weeks) that tell you that the SharePoint Database has large amounts of unused space in the health monitor - one or more Databases might be involved but typically the Usage Application DB (WSS_UsageApplication) is the one.

You can try to use the "Fix Automatically" but I've had mixed results (i.e. says fine, but shows up again later). The for sure fix is simple (Unfortunately the help referenced in the analyzer isn't very clear):

1) Login to the SQL Server box
2) Open the SQL Management Studio
3) Expand the Databases, right click on the Database in question and select New Query
4) Enter in the following command in the Query window:

     dbcc shrinkdatabase (WSS_UsageApplication)

5) Then click the Execute button.

Note the full format for this command is dbcc shrinkdatabase(dbname, target size in MB) - so dbcc shrinkdatabase(WSS_UsageApplication, 25) would reduce it to 25mb; by NOT specifying the target size, the DB will be reduced to the default size. In most cases (particularly for the Usage DB, this is the best setting).

No comments: