Shrinking Databases
Scenarios
You can use a stored procedure to shrink the size of the data and log files in a specified database.
Prerequisites
An RDS Microsoft SQL Server DB instance has been connected. Connect to the DB instance through the Microsoft SQL Server client. For details, see Connecting to a DB Instance Through a Public Network.
Procedure
- Run the following command to shrink the database:
EXEC [master].[dbo].[rds_shrink_database] @DBName='myDbName';
Table 1 Parameter description Parameter
Description
myDbName
Name of the database to be shrunk. If this parameter is not specified, all databases are shrunk by default.
- After the command is successfully executed, the following information is displayed:
HW_RDS_Process_Successful: Shrink Database Done.
Last Article: Removing Operators
Next Article: Change History

Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.