69

Always On SQL Server Replica in a Disconnected State

 5 years ago
source link: https://www.tuicool.com/articles/hit/AfAna2m
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

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.

  1. There is an issue with the port, so conflict or something in regards to the default port 5022.
  2. Endpoint issue
    1. AGs use endpoints to communicate
      1. Check the state of the endpoint
      2. Check the endpoint ports
      3. Check the permissions on the endpoint

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.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK