Resolving Disconnected Secondary Replica or Database in Always On Availability Groups
It’s not uncommon to encounter situations where either the secondary database or the secondary replica enters a disconnected state in an Always On Availability Group (AG). This typically occurs during initial AG configurations or after events like OS/SQL patching, network issues, or failovers.
Recently, I faced a scenario where not only was the secondary database in a disconnected state, but the entire secondary replica was also marked as disconnected in the AG dashboard. As a result, the transaction log (T-log) started growing due to unsynchronized data movement.
Below are the steps I followed to troubleshoot and resolve the issue:
Steps to Resolve:
-
Connected to both Primary and Secondary replicas via SSMS.
-
On the Secondary node, navigated to:
Always On High Availability > Availability Groups (AVG) > [Your AG Name]
-
Under Availability Databases, right-clicked the affected database, then:
Suspend Data Movement > Resume Data Movement
Note: This did not resolve the issue.
-
Restarted the HADR Endpoint on both replicas:
This also did not resolve the issue initially.
-
Granted CONNECT permissions to the SQL Server service account (used by the secondary replica) on both nodes:
-
After applying the endpoint permission, I re-executed Step 4 (restarting endpoints).
This time, the secondary replica successfully reconnected, and data synchronization resumed.
No comments:
Post a Comment