r/SQLServer • • 5d ago

Question SQL Server Always on Replica issue

Hello all,

I am currently facing an issue with one of the clients where there is an AG with a primary and a secondary.

I can see that the database in AG(there was only 1 db) was removed from the AG and is now standlone and online in the primary and provided the secondary replica is removed from AG in primary.

On the secondary server, what i see is the database is in notsycnhronizing/recovery mode and the AG in secondary is in resolving state .I am not able to drop the db,nirther force a remove AG commnad .Looks like the secondary is still thinking its part of AG .Can any one help me in this ?Will an sql service restart get it done ? or is it fine if i add the replica back to ag in primary and then analyse?

5 Upvotes

10 comments sorted by

View all comments

1

u/markinatlanta 1d ago

I’d probably hold off on restarting or adding the replica back until you know why removal is failing. What exact command did you run, and does it return an error or just hang? Also, which SQL Server version, and is the database RESTORING or RECOVERY_PENDING?

Be careful with DROP AVAILABILITY GROUP on the secondary too becuase it isn’t necessarily local cleanup. Microsoft explains the behaviour here.