Troubleshoot Always On AG: Disconnected Replica
Exhibit
Refer to the exhibit.
```
-- Current state of the availability group
SELECT ag.name AS ag_name,
replica_server_name,
role_desc,
operational_state_desc,
connected_state_desc,
synchronization_health_desc,
last_connect_error_number,
last_connect_error_time
FROM sys.dm_hadr_availability_replica_states rs
JOIN sys.availability_groups ag ON rs.group_id = ag.group_id
WHERE ag.name = 'AG1';
```
Output:
ag_name | replica_server_name | role_desc | operational_state_desc | connected_state_desc | synchronization_health_desc | last_connect_error_number | last_connect_error_time
AG1 | SQLVM-Primary | PRIMARY | PENDING_FAILOVER | CONNECTED | HEALTHY | 0 | NULL
AG1 | SQLVM-Secondary | SECONDARY | ONLINE | DISCONNECTED | NOT_HEALTHY | 35202 | 2024-03-15 10:30:00.000You are troubleshooting an Always On Availability Group named AG1. The exhibit shows the current state. The primary replica shows PENDING_FAILOVER. The secondary replica is DISCONNECTED with error 35202. What is the most likely cause of this issue?
Quick Answer
The most likely cause is that network connectivity between the replicas is blocked on port 5022, the default endpoint used by Always On Availability Groups for data synchronization and heartbeats. When the primary replica shows PENDING_FAILOVER, a failover was started but could not finish because the secondary replica is DISCONNECTED—error 35202 specifically indicates that a connection attempt to the secondary failed, and in an AG environment that almost always points to a firewall or route blocking the dedicated endpoint port. For the Microsoft Azure Database Administrator Associate DP-300 exam, this scenario tests your ability to interpret replica states and correlation between error codes and network layer issues; a common trap is assuming authentication or mirroring endpoint misconfiguration, but the telltale sign here is the combination of PENDING_FAILOVER plus error 35202, which isolates the root cause to the network path. Remember: if you see 35202, think “5022 blocked”—the last four digits of the error mirror the default port.
⚠ Common exam trap
Many exam-takers confuse the availability group listener port (default 1433) with the replica-to-replica synchronization endpoint port (default 5022), leading them to incorrectly attribute the issue to listener misconfiguration rather than a blocked endpoint port.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Network connectivity between the replicas is blocked on port 5022
The PENDING_FAILOVER state on the primary replica indicates that a failover was initiated but could not complete because the secondary replica is DISCONNECTED. Error 35202 specifically indicates that a connection attempt to the secondary replica failed, which in an Always On Availability Group (AG) is typically due to a network connectivity issue on the dedicated endpoint port (default 5022). Since the secondary is unreachable, the failover cannot finalize, leaving the primary in a pending state.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Network connectivity between the replicas is blocked on port 5022
Why this is correct
Error 35202 often relates to connectivity issues on the mirroring endpoint port.
- ✗
The availability group listener is not configured correctly
Why it's wrong here
Listener issues do not cause replica disconnection.
- ✗
The primary instance encountered a critical error and failed over automatically
Why it's wrong here
PENDING_FAILOVER indicates a manual or forced failover, not automatic.
- ✗
The cluster has lost quorum
Why it's wrong here
Quorum loss would show different symptoms; both replicas would be affected.
Go deeper
Related to this question
About these practice questions
This DP-300 question is part of Courseiva's 906-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
Same concept, more angles
1 more way this is tested on DP-300
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. Refer to the exhibit. After a brief outage, the availability group recovered. However, SQL2 shows NOT_HEALTHY and DISCONNECTED. What is the most likely cause?
hard- A.The automatic failover policy requires a quorum that is not met.
- B.The listener is not configured correctly for SQL2.
- C.The secondary replica SQL2 has an incompatible database version.
- ✓ D.The network connection between SQL1 and SQL2 is still down after the outage.
Why D: The error 35201 indicates a connection timeout. SQL2 is configured for automatic failover and synchronous commit. After the restart, SQL2 remains disconnected and not healthy. This is likely because the network connectivity between SQL1 and SQL2 is still interrupted or there is a persistent issue. Since SQL3 is connected and healthy, the issue is specific to SQL2.
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This DP-300 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DP-300 exam.