Renaming a Amazon RDS for Microsoft SQL Server database in a Multi-AZ deployment (original) (raw)
To rename a Microsoft SQL Server database instance that uses Multi-AZ, use the following procedure:
- First, turn off Multi-AZ for the DB instance.
- Rename the database by running
rdsadmin.dbo.rds_modify_db_name
. - Then, turn on Multi-AZ Mirroring or Always On Availability Groups for the DB instance, to return it to its original state.
For more information, see Adding Multi-AZ to a Microsoft SQL Server DB instance.
Note
If your instance doesn't use Multi-AZ, you don't need to change any settings before or after running rdsadmin.dbo.rds_modify_db_name
.
Example: In the following example, therdsadmin.dbo.rds_modify_db_name
stored procedure renames a database fromMOO
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
Dropping a SQL Server database
Resetting the db_owner role membership for master user
Did this page help you? - Yes
Thanks for letting us know we're doing a good job!
If you've got a moment, please tell us what we did right so we can do more of it.
Did this page help you? - No
Thanks for letting us know this page needs work. We're sorry we let you down.
If you've got a moment, please tell us how we can make the documentation better.