Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have removed a High Availability Group, disabled the option in sql configuration manager and restarted and I have also removed the Failover cluster components from windows and restarted.

Unfortunately the databases are marked as Recovery Pending on both servers.

I have attempted to drop them, but get this:

Msg 3752, Level 16, State 1, Line 1
The database 'GEO' is currently joined to an availability group. Before you can drop the database, you need to remove it from the availatility group.

I also tried to recovery the db with no success and also set it into emergency mode but cannot:

The operation cannot be performed on database "GEO" because it is involved in a database mirroring session or an availability group. Some operations are not allowed on a database that is participating in a database mirroring session or in an availability group.

I even tried to brute force the server by stopping the engine and renaming the file to try to get it into suspect, but its still in recovery pending... I cant re-enable the HADR settings as the windows cluster has been destroyed.

All systems catalogs are empty apart from sys.availability_replicas which has a reference to the other server (first time in a few years I wish I was back in the good old days when I could access system tables).

Any ideas how to get rid of these databases?

share|improve this question

To resolve this I had to recreate the whole Failover cluster, re-enable HA in the SQL Configuration manager and then I could set one of the db's to recover

share|improve this answer

you need to remove it from the Availability Group , you can find both tsql and poweshell scripts in this link:

important! You must be connected to the server instance that hosts the secondary replica from which the database is to be removed.

share|improve this answer
the availability group no longer existed as had been dropped – DamagedGoods Jan 28 '13 at 15:15

I had similar problems, and this solved it

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.