Ran into an issue where my test environment database server bloated its .vhd file after performing several restores from backup through DPM 2010. The bloat caused the blade server to run out of space and froze all the other VMs on the server. Sys admin was not too happy about it!
Investigation found that the SharePointAdmin and SP_Config database log files have grown to nearly 20 GB each. All the databases were also sitting on the C: Drive.
Move all databases to another drive, shrink log files and truncate SP_Config.log and SharePointAdmin.log.
Stop the following services on all SharePoint servers.
- SharePoint 2010 Administration
- SharePoint 2010 Timer
- SharePoint 2010 Tracing
- SharePoint 2010 User Code Host
- SharePoint 2010 VSS Writer
- SharePoint Foundation Search V4
- World Wide Web Publishing Service
- SharePoint Server Search 14
- Web Analytics Data Processing Service
- Web Analytics Web Service
On the database server, use SQL Management Studio to detach all the databases and copy them to the new location. If moving the Web Analytics database, ensure that you copy all the *.ndf files to the same folder as the *.mdf file.
Reattach the databases and log files.
Truncate the oversized log files by performing the following commands:
BACKUP LOG [Sharepoint_Config] WITH TRUNCATE_ONLY
DBCC SHRINKFILE (’SharePoint_Config_log’ , 50)
Restart all services that were stopped in Step 4.
Everyone is happy!