Amazon Relational Database Service
User Guide (API Version 2014-10-31)

Renaming a Microsoft SQL Server Database in a Multi-AZ with Mirroring Deployment

To rename a Microsoft SQL Server database instance that uses Multi-AZ with Mirroring, use the following procedure:

  1. First, turn off Multi-AZ with Mirroring for the DB instance.

  2. Rename the database by running rdsadmin.dbo.rds_modify_db_name.

  3. Then, turn on Multi-AZ with Mirroring for the DB instance, to return it to its original state.

For more information, see Adding Multi-AZ with Mirroring to a Microsoft SQL Server DB Instance.

Note

If your instance doesn't use Multi-AZ with Mirroring , you don't need to change any settings before or after running rdsadmin.dbo.rds_modify_db_name .

Example: In the following example, the rdsadmin.dbo.rds_modify_db_name stored procedure renames a database from MOO to ZAR. This is similar to running the statement DDL ALTER DATABASE [MOO] MODIFY NAME = [ZAR].

EXEC rdsadmin.dbo.rds_modify_db_name N’MOO’, N’ZAR’ GO