Optimize the space of SQL Server databases


In this tutorial I will show how to optimize the space used by databases.

The optimization of the space is done in two stages:

  • On the database: internal data optimization
  • On files: reducing the size of the files on the disk.

It is recommended that you perform these operations after deleting a large amount of data.

Reduce the size of the database

1. Connect to the server with SQL Server Management Studio.
SSMS - Login 

2. Right-click on the database to click Tasks 1 / Minimize 2 / Database 3 .
Database options

3. We can see the space that will be released 1 . Click OK 2 to start the optimization.
Start optimization

4. Waiting during the process, once finished, the window will close.

Reduce file size

As for the size of the database, the operation is to do with SSMS.

1. Right-click on the base to click on Tasks 1 / Minimize 2 / Files 3 .
Database options

2. As for the database, we can see the gain. Click OK to reduce the size of the files.
Start optimization


Related Posts

Exchange 2016: how to set up a DAG

In this tutorial, we'll see how to set up a Database Availability Group (DAG) that makes the Exchange Highly Available (HA) databases available. This feature of Exchange makes it possible to put the d

BranchCache – Installation and Configuration

In this tutorial, we will set up a cache system on file servers to speed up access for remote sites. For that we will set up the BranchCache solution. BranchCache is an extended WAN bandwidth optimiza

SQL Express: backup plan with SQL Backup Master

IntroductionCreating a SQL Express backup plan Introduction With the SQL Express version, it is not possible to set up a backup plan using SSMS. There are many scripts on the Internet for performing a