Database has large amounts of unused space
April 7th, 2011- Posted By: Jonathan Adams
- Comments Off on Database has large amounts of unused space
Detail: Following databases have large amounts of space allocated on the disk but not in use. This may be due to recent deletion of data form the database, or because the database has been pre-grown to a larger size. This database will take up a larger amount of space on the file system unless it is shrunk down to a smaller size.
- WSS_Content on Database Server/Cluster
Solution: This occurs when the recovery mode is set to Full and a transaction log backup has not occurred for quite a while. As part of a transaction log backup the sql logs are truncated. If this does not occur for a while, the log files will continue to grow. Even after a transaction log backup, the log files will remain at the enlarged size until shrunk. While this should in theory be accomplished with Full recovery models, experience has proved it is easiest to switch to Simple recovery and then run the shrink command.
NOTE: This should NOT be done until a full backup and transaction log backup has been done, otherwise data may be lost!
- Backup the WSS_Content database and logs
- Convert database to Simple recovery mode
- Shrink the database
- Convert the database back to Full recovery mode
0 Comments