对于20122016高可用版,是用镜像做的主备同步,直接drop database删除数据库会有类似报错:
The database ‘XX' is enabled for database mirroring. Database mirroring must be removed before you drop the database.
解决方案:
高可用版删除数据库,需要先删除镜像,然后再删除数据库
删除镜像的方法:
https://msdn.microsoft.com/zh-sg/library/ms190471(v=sql.110).aspx
对于2017高可用版,是用alwayson做的主备同步,直接drop database删除数据库会有类似报错:
The database 'XX' is currently joined to an availability group. Before you can drop the database, you need to remove it from the availability group.
解决方案:
用RDS提供的存储过程删除
EXEC sp_rds_drop_database 'database name'