Take the 2-minute tour ×
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. It's 100% free, no registration required.

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

3 Answers 3

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: http://msdn.microsoft.com/en-us/library/hh231120.aspx

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

Just take the database offline and bring it online again. It worked for me (SQL Server 2012).

share|improve this answer
1  
Are you really sure this will work in the scenario that OP is having ? Can you add more details ? –  Kin Dec 4 at 17:35

Your Answer

 
discard

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.