Allow DBs to be Renamed when GeoReplication is enabled and MI is part of a Failover Group
I have an Azure SQL Managed Instance that is set up with geo-replication. I have a database on this MI that I want to swap out with another database by renaming them:
ALTER DATABASE mydb MODIFY NAME = mydbold;
ALTER DATABASE mydbnew MODIFY NAME = mydb;
When I run this, I get an error error:
The operation cannot be performed since the database 'mydb' is in a replication relationship. The only way to rename the database is to remove the entire MI from the failover group, rename the database, drop all databases from the secondary, and then re-establish the failover group. It would be nice to be able to rename a DB without all of this.