Sometimes the SQL logs and application logs provide some great info in regards to errors and issues. When building an Always On environment the error messages you can possibly run across are very vague and most the time not useful.
In this post we are going to talk about what to do when the secondary replica in the availability group is in a disconnected state. There are a few reasons this might be.
- There is an issue with the port, so conflict or something in regards to the default port 5022.
- Endpoint issue
- AGs use endpoints to communicate
- Check the state of the endpoint
- Check the endpoint ports
- Check the permissions on the endpoint
- AGs use endpoints to communicate
Most of the time those two problems when resolved fix a disconnected replica.
For times that those two items do not fix a disconnected replica check out the following query for the error description column:
select * from sys.dm_hadr_availability_replica_states
The information from the query is a lot more helpful and more detailed that what the generic errors in the SQL log display.
The post Always On SQL Server Replica in a Disconnected State appeared first on VitaminDBA.