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


How useful was this post?

Click on a star to rate it!

Average rating / 5. Vote count:

We are sorry that this post was not useful for you!

Let us improve this post!

Related Posts

Exchange 2019: Add a database
Introduction Using multiple databases to store mailboxes allows you to configure a different volume. Example: The DBMX01 database stores mailboxes with a 1GO quota and the DBMX02 database stores mailboxes with a 5GB quota. With this configuration, si

GLPI 9.3 convert tables to innodb
Presentation Since version 9.3 of GLPI, the new installations use the InnoDB storage format instead of MyISAM. When updating your GLPI, the tables will not be automatically migrated. The migration must be done by hand. When connecting to your site yo

Exchange change a database mailbox
Presentation In this tutorial, we will see how to change a database mailbox. This is done regularly in Exchange environments with multiple databases with different quotas (limits). Moving the mailbox allows it to have the new quotas linked to the dat

Leave a Comment