In AWS RDS MSSQL we have mirroring running between primary and replica via Always On.
We want to remove/drop a couple of databases, but when we try:
ALTER AVAILABILITY GROUP RDSAG0 REMOVE DATABASE [db-name]
we receive the error:
Msg 15151, Level 16, State 1, Line 27 Cannot alter the availability group 'RDSAG0', because it does not exist or you do not have permission.
Any advice is greatly appreciated
AWS RDS has some platform-specific commands which you should familiarize yourself with. Running EXECUTE msdb.dbo.rds_drop_database N’your-database-name’ will perform all of the tasks necessary to remove the database from the AG and then drop it. Source: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.SQLServer.CommonDBATasks.DropMirrorDB.html