TencentDB for SQL Server supports reducing database size by shrinking all database files to release unused space. This document describes how to shrink a database in the TencentDB for SQL Server console.
Shrinking One Database
- Log in to the TencentDB for SQL Server console. In the instance list, click an instance ID or Manage in the Operation column to access the instance management page.
- On the Database Management tab, locate the row of the database to be shrunk and click Other > Shrink Database in the Operation column.

- The pop-up window displays the database name and the ratio of remaining space. Currently, only shrinking to 10% of the free space is supported.
Note:
Only 10% of the database's free space will remain once it has been shrunk. However, if 10% of free space is less than 2 GB, the free space will be shrunk to 2 GB.

You can view the task progress of database shrinking through Running Tasks in the top-right corner of the Database Management tab.

Batch Shrinking Databases
- Log in to the TencentDB for SQL Server console. In the instance list, click an instance ID or Manage in the Operation column to access the instance management page.
- On the Database Management tab, select the rows of the databases to be shrunk and click Batch Management > Batch Shrink Databases at the top of the list.

- The pop-up window displays the database names and the ratios of remaining space. Currently, only shrinking to 10% of the free space is supported.
Note:
Only 10% of the database's free space will remain once it has been shrunk. However, if 10% of free space is less than 2 GB, the free space will be shrunk to 2 GB.

You can view the task progress of database shrinking through Running Tasks in the top-right corner of the Database Management tab.
Was this page helpful?