This topic describes how to delete a database from an ApsaraDB RDS for SQL Server instance. You can delete a database by using the ApsaraDB for RDS console or an SQL statement.

Delete a database by using the ApsaraDB for RDS console

  1. Visit the RDS instance list, select a region above, and click the target instance ID.
  2. In the left-side navigation pane, click Databases.
  3. In the Actions column click Delete.
  4. In the message that appears, click OK.

Delete a database by using an SQL statement

  1. Connect to the RDS instance to which the database belongs. For more information, see Connect to an ApsaraDB RDS for SQL Server instance.
  2. Execute the following statement to delete the database:
    drop database <database name>;
    Note If the RDS instance runs SQL Server 2012 or later on RDS High-availability Edition, run the following stored procedure. This stored procedure deletes the specified database, removes the associated image, and closes the connection to the database.
    EXEC sp_rds_drop_database 'database name'

Related operations

Operation Description
DeleteDatabase Deletes a database from an ApsaraDB RDS instance.