In a situation where when you have deleted a large amount of data and you are not intending to reuse the space by further inserts into the database, you may want to shrink the MSSQL databases. It can be done in one of the two following ways:

From Management Studio

Once connected to server with Management Studio go to Databases and right click Database > Select Tasks > Shrink > Select Database or Files.

 

From HostPilot Control Panel

You can shrink databases via HostPilot > MSSQL Server > Commands.

DBCC SHRINKFILE shrinks the size of the specified data/log file for the database. Syntax:

DBCC SHRINKFILE

    ( { file_name | file_id }

        { [ , target_size ]

            | [ , { EMPTYFILE | NOTRUNCATE | TRUNCATEONLY } ]

        }

    )

DBCC SHRINKDATABASE shrinks the size of the data files in the specified database. Syntax:

DBCC SHRINKDATABASE
( database_name [ , target_percent ]

 [ , { NOTRUNCATE | TRUNCATEONLY } ]

 ) 

Notes:

  • Once you have managed to shrink the database, send a note to Technical Support and we will adjust your billing to reflect the new database size.
  • It is recommended that you set the Maximum free space in files after shrinking to at least 10% on the Shrink Database screen for performance reasons.