Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
I just found a database, and I have no Idea what to do. I can't drop, update, or anything.
The database is in this state:
How can i turn it off? Because, it's already off !
I tried to restore database ...set online.
restore database ...set online
ALTER DATABASE <<DB NAME>> SET PARTNER OFF
SELECT mirroring_role FROM sys.database_mirroring WHERE DB_NAME(database_id) = N'your_database_name'
Your error message is useful to know that the database you are trying to remove is not in mirroring. It is part of Availablity group.
You can use below command to remove the database from Availablity group :
ALTER AVAILABILITY GROUP YourAG REMOVE DATABASE DBthatYouWantToRemove;
Required, but never shown