Secondary replica in SQL Availability Group is DISCONNECTED

Florian Prestifilippo 1 Reputation point
2021-09-23T09:44:15.843+00:00

Hi everyone,

I'm currently setting up a new database environment at work.
We have two SQL 2016 servers across our infrastructure that needs to be setted up with Availability Groups.
I read and followed several tutorials but I'm facing an issue that I can't solved.

I have a Windows Failover Cluster that's running fine, no error and so on.
I then have created an Availability Group between my SQL servers and everything went fine too.
All the check during the configuration went perfectly and the Availablity Group has been created.
But here comes the thing, when I check on my availability replicas, it says that my secondary replica is in critical state with several warning/errors messages and so the databases aren't replicating. When I check these messages, it says that my secondary replica is not connected to my primary one, the connected state is DISCONNECTED.

134672-capture.png

But I can't figure out why, I allowed everything necessary in our firewall, and I can't see anything denied between the two servers.
Thus, during the creation of the availability group, the servers can perfectly join each others and I can see that the group has been created on both servers...
It's the first time I'm working with availability groups so maybe I missed something somewhere, but nothing that has been mentionned on the different tutorial I've read.

Thanks !

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,786 questions
Windows Server Clustering
Windows Server Clustering
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.Clustering: The grouping of multiple servers in a way that allows them to appear to be a single unit to client computers on a network. Clustering is a means of increasing network capacity, providing live backup in case one of the servers fails, and improving data security.
996 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Limitless Technology 39,611 Reputation points
    2021-09-23T11:52:23.547+00:00

    Hello FlorianPrestifilippo,

    Have you tried the reasons and approach from the next Microsoft article?

    https://learn.microsoft.com/en-us/sql/database-engine/availability-groups/windows/availability-replica-is-disconnected?view=sql-server-ver15

    0 comments No comments

  2. Seeya Xi-MSFT 16,471 Reputation points
    2021-09-24T04:39:37.763+00:00

    Hi @FlorianPrestifilippo-8004,

    Please refer to this link: https://learn.microsoft.com/en-us/sql/database-engine/availability-groups/windows/data-synchronization-state-of-some-availability-database-is-not-healthy?view=sql-server-ver15
    Can you provide more error information?
    For example, error log(Path or UI in SSMS), Windows events(See the picture).
    134826-2.png
    Error log is located at Program Files\Microsoft SQL Server\MSSQL.n\MSSQL\LOG\ERRORLOG .
    This will be helpful to solve the problem.

    Here is the possible solution: https://basitaalishan.com/tag/availability-groups-database-state-not-synchronizing/

    Best regards,
    Seeya


    If the response is helpful, please click "Accept Answer" and upvote it, as this could help other community members looking for similar queries.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.