You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This policy checks the connection state between availability replicas. The policy is in an unhealthy state when the connection state of the availability replica is DISCONNECTED. The policy is otherwise in a healthy state.
31
+
32
+
This policy checks the connection state between availability replicas. The policy is in an unhealthy state when the connection state of the availability replica is DISCONNECTED. The policy is otherwise in a healthy state.
30
33
31
-
## Possible Causes
32
-
The secondary replica is not connected to the primary replica. The connected state is DISCONNECTED. This issue can be caused by the following:
34
+
## Possible Causes
35
+
36
+
The secondary replica isn't connected to the primary replica. The connected state is DISCONNECTED. This issue can be caused by the following:
33
37
34
-
-The connection port might be in conflict with another application.
38
+
- The connection port might be in conflict with another application.
35
39
36
-
-The encryption type or algorithm is mismatched.
40
+
- The encryption type or algorithm is mismatched.
37
41
38
-
- The connection endpoint has been deleted or has not been started.
39
-
40
-
- The transport is disconnected.
42
+
- The connection endpoint has been deleted or hasn't been started.
41
43
44
+
- There are network/connectivity issues or Ports are blocked at the firewall.
45
+
46
+
- Service/startup account isn't a domain user and isn't able to connect to the DC and to the remote node and port (for example, 5022)
47
+
42
48
## Possible Solutions
43
-
Following are possible solutions for this issue:
44
-
45
-
- Check the database mirroring endpoint configuration for the instances of the primary and secondary replica and update the mismatched configuration.
49
+
50
+
Check the database mirroring endpoint configuration for the instances of the primary and secondary replica and update the mismatched configuration. Also, check if the port is conflicting, and if so, change the port number.
51
+
52
+
The following are possible solutions for this issue:
53
+
54
+
- The connection port might be in conflict with another application.
55
+
56
+
Run the following commands to diagnose port issue:
57
+
58
+
```PowerShell
59
+
$server_name = "server_instance" #replace with your instance
60
+
Sqlcmd -S $server_name -E -Q "SELECT type_desc, port FROM sys.tcp_endpoints WHERE type_desc = 'DATABASE_MIRRORING'; "
61
+
```
62
+
The above command will return the port number that you have to use in below command.
63
+
64
+
```PowerShell
65
+
$port = "5022"
66
+
Get-NetTCPConnection -LocalPort $port
67
+
Get-Process -Id (Get-NetTCPConnection -LocalPort $port).OwningProcess |Select-Object Name, ProductVersion, Path, Id
68
+
```
69
+
70
+
- The encryption type or algorithm is mismatched.
71
+
72
+
Run this on both servers and compare the encryption and make sure both are same:
73
+
74
+
```PowerShell
75
+
$server_name = "server_instance" #replace with your instance
- Service/startup account is not a domain user and is not able to connect to the DC and to the remote node and port (for example, 5022)
109
+
110
+
To test whether the service account can connect to the remote node, follow these steps. The steps assume that you are not logged in with the service account:
111
+
112
+
1. Select **Start** > **Windows PowerShell** > right-click the icon.
113
+
1. Select **More** > **Run as Different User** > **Use a different account**.
114
+
1. Type the service account name and password.
115
+
1. After Windows PowerShell opens, type the following command to verify you've logged in with the service account:
116
+
117
+
```PowerShell
118
+
whoami
119
+
```
120
+
121
+
1. Then you can test the connection to the remote node. For example:
122
+
123
+
```PowerShell
124
+
$computer = "remote_node" # Replace with Naode name as per your environment.
125
+
$port = "5022" # Replace with the port from your database_mirroring_endpoints.
[Overview of Always On Availability Groups (SQL Server)](../../../database-engine/availability-groups/windows/overview-of-always-on-availability-groups-sql-server.md)
51
-
[Use the Always On Dashboard (SQL Server Management Studio)](../../../database-engine/availability-groups/windows/use-the-always-on-dashboard-sql-server-management-studio.md)
129
+
## See also
130
+
- [Overview of Always On Availability Groups (SQL Server)](../../../database-engine/availability-groups/windows/overview-of-always-on-availability-groups-sql-server.md)
131
+
- [Use the Always On Dashboard (SQL Server Management Studio)](../../../database-engine/availability-groups/windows/use-the-always-on-dashboard-sql-server-management-studio.md)
0 commit comments