Tuesday, February 1, 2011

SharePoint DB is full. How to reduce the size of a DB

My SharePoint site is down and i am not able to create any new sites.

Root Cause: My SQL DB is full.  E drive has left out 0 bytes.
I ran these commands against the large Databases and able to free up space up to 6 GB.


 
 /* Shrink Whole WSS_Content_ckm_sales_dev Database */
DBCC SHRINKDATABASE (WSS_Content_ckm_sales_dev)
GO
/* Get the Logical File Name */
USE WSS_Content_ckm_sales_dev
EXEC sp_helpfile
GO
/* Shrink MDF File of WSS_Content_ckm_sales_dev Database */
DBCC SHRINKFILE(WSS_Content_ckm_sales_dev)
GO

No comments:

Post a Comment