I've removed a db from a synchronous availability group.The db shows "synchronizing/suspect" as it should on the secondary. I'm trying to remove this database cannot. I have tried:
DROP DATABASE [db1];
but get "Cannot drop database "db1" because it is currently in use.". even though their are no sessions using this database.
ALTER DATABASE [db1] SET OFFLINE;
but get "ALTER DATABASE failed because a lock could not be placed on database 'db1'. Try again later."
ALTER DATABASE [db1]
SET SINGLE_USER WITH ROLLBACK IMMEDIATE
but get "ALTER DATABASE failed because a lock could not be placed on database 'db1'. Try again later."
ALTER DATABASE [db1] SET EMERGENCY;
ALTER DATABASE failed because a lock could not be placed on database 'db1'. Try again later.
This is a 24/7 production db and restarting is not a good option.
Any advice?