Databases in SQL 2016 AlwaysOn in (Not synchronising/Recovery Pending) state. AG in (Distributed) and replica (resolving)

by Bun   Last Updated September 18, 2018 00:06 AM

I have got databases in SQL 2016 AlwaysOn in (Not synchronising/Recovery Pending) state. AG on both nodes says (Distributed) and replicates state is (resolving). I am trying to delete database since I can restore from backups. Cannot delete database as they are a part of AG, not able to remove AG due to resolving state.

Tried

ALTER AVAILABILITY GROUP [MyAG01] REMOVE DATABASE [DB01];

and it says

'Availability group 'MyAg01' failed to process remove-database command. The local availability replica is not in a state that could process the command. Verify that the availability group is online and that the local availability replica is the primary replica, then retry the command.'

Any attempt on alter database gives this:

'The operation cannot be performed on database "DB01" 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.'

Also tried dismount-dbadatabase -force and remove-dbadatabase Powershells



Related Questions



Mixing 2 and 3 node AG on a single WSFC?

Updated January 17, 2018 19:06 PM



AG Group failover and quorum

Updated September 14, 2018 17:06 PM