How do I make my database smaller?

×
In normal usage a Microsoft SQL database will grow gradually over time and the amount of free space in the database will be normal. However, sometimes you will do a large purge of data and the database will have too much free space in it. The DBCC SHRINKFILE command will help in this scenario:

DBCC SHRINKFILE({Logical Filename})

{Logical Filename} is the Logical File Name of your database file which can be found in Database Properties under the File tab. Use the Logical Filename with a File Type of ROWS Data.

Remember, as a rule, this should not be run regularly, you should allow Microsoft SQL to manage the free space.