J Wolfgang Goerlich's thoughts on Information Security
SQL Server Tip: Shrink Database

By wolfgang. 10 September 2008 20:54

This tip works on SQL Server 2000 and SQL Server 2005. To shrink the db, use the logical name. You have to put it into simple recovery mode to get the disk space back. The command I have been running is:

Alter Database MYDBName Set Recovery SIMPLE
DBCC Shrinkfile (MYDBName_Log)
Alter Database MYDBName Set Recovery FULL

Tags:

    Log in