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

PRTG: equipment dependent on a parent
Introduction PRTG allows you to create dependencies between multiple devices. This allows in case of failure of a device to pass the others automatically paused. This parameter can be used with servers and a switch. In this tutorial, we will use it t

SQL Server: Set up a backup plan
Introduction In this article, I will explain how to set up a backup plan with SQL Server. In this tutorial, we will use the wizard available in SSMS to configure the database to save as well as the schedule and then we will modify the plan to indicat

Sharepoint 2013 foundation: installation and configuration
In this tutorial, we will see how to set up Sharepoint 2013 foundation on Windows 2012R2. Although this version at the time of writing this article is more than 5 years old, it allows to discover Sharepoint before making its acquisition. SharePoint i

Leave a Comment