Quantcast
Channel: SQL Server High Availability and Disaster Recovery forum
Viewing all articles
Browse latest Browse all 4689

Database in an Availability Group

$
0
0

I have a database that currently believes its in an Availability Group that it is not in. When I check the sys.dm_hadr_database_replica_states view on the primary replica I see 2 rows one for a primary replica and one for a secondary replica.

When I run the same query on the secondary replica I don't see any records I also do not have that database on the secondary replica.

Back on the primary replica I attempt to remove it from the AG and get the following error
Database 'X' cannot be removed from availability group 'AG'.  The database is not joined to the specified availability group.  Verify that the database name and the availability group name are correct, then retry the operation.

Then I attempt to add it even though it says its there already and I get the following error
Database 'X' cannot be added to availability group 'AG'.  The database is already joined to the specified availability group.  Verify that the database name is correct and that the database is not joined to an availability group, then retry the operation.

Because this database thinks its in an AG I can not delete it or take it offline.


Viewing all articles
Browse latest Browse all 4689

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>