Quantcast
Viewing all articles
Browse latest Browse all 1519

SharePoint content database with 98% free space will not shrink

I have a production SharePoint 2013 database. It was migrated from SharePoint 2010 and thus has a large amount (98%) of free space. It is appropriate after migration from one version of SharePoint to another to shrink the database as the migration process creates a large amount of unused space during the translation process. Other databases in the environment have shrunk as expected, but this one has remaind large.

Here are facts about the database:
DatabaseName databaseName
MdfName__ databaseMDFName
mdfSizeMB 167300.25
mdfUsedMB 3202.5
mdfFreeMB 164097.75
pctmdfUsed 0.019142231
pctmdfFree 0.980857769
ldfSizeMB 25.56
ldfUsedMB 22.14
ldfFreeMB 3.42
pctldfUsed 0.866197183
pctldfFree 0.133802817

---
Here are the commands that I have attempted to use:

--Shrink with percent of free space to leave

USE [databaseName]
GO
DBCC SHRINKDATABASE(N'databaseName', 20 )
GO

Results:
DbId FileId CurrentSize MinimumSize UsedPages EstimatedPages
281 1 21414432 288 409584 409584
281 2 3272 72 3272 72

--- Shrink with target size in MB
USE [databaseName]
GO
DBCC SHRINKFILE (N'databaseMDFName' , 3843)
GO

Results:
DbId FileId CurrentSize MinimumSize UsedPages EstimatedPages
281 1 21414432 288 409584 409584

---
USE [databaseName]
GO
DBCC SHRINKFILE (N'databaseMDFName' , NOTRUNCATE)
GO

Results:
DbId FileId CurrentSize MinimumSize UsedPages EstimatedPages
281 1 21414432 288 409584 409584

After the above I reran the previous shrink with target size

Why will the database not shrink. What can be done to shrink the file. (Using the TRUNCATEONLY option is not supported for SharePoint content databases.)


Viewing all articles
Browse latest Browse all 1519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>