Issue:
Unable to get AlwaysOn database back online.
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. (Microsoft SQL Server, Error: 41190)
Fix:
Drop AlwaysOn and re-create it.
Steps:
Remove AlwaysOn from primary and secondary database servers.
Drop database on secondary database server.
Restore database on primary database server.
RESTORE DATABASE [MyDatabase] WITH RECOVERY
Database should be back to normal on primary database server.
Recreate AlwaysOn on primary database server.
Comments