@@ -56,7 +56,7 @@ The following are possible solutions for this issue:
5656 Run the following commands to diagnose port issue:
5757
5858 ``` PowerShell
59- $server_name = "server_instance" #replace with your instance
59+ $server_name = "server_instance" #replace with your SQL Server instance
6060 Sqlcmd -S $server_name -E -Q "SELECT type_desc, port FROM sys.tcp_endpoints WHERE type_desc = 'DATABASE_MIRRORING'; "
6161 ```
6262 The above command will return the port number that you have to use in below command.
@@ -72,7 +72,7 @@ The following are possible solutions for this issue:
7272 Run this on both servers and compare the encryption and make sure both are same:
7373
7474 ``` PowerShell
75- $server_name = "server_instance" #replace with your instance
75+ $server_name = "server_instance" #replace with your SQL Server instance
7676 sqlcmd -S $server_name -E -Q "SELECT name, state_desc, encryption_algorithm_desc, protocol_desc, type_desc FROM sys.database_mirroring_endpoints"
7777 ```
7878
@@ -81,20 +81,24 @@ The following are possible solutions for this issue:
8181 Run the following command if the mirroring endpoint exits and is started.
8282
8383 ``` PowerShell
84- $server_name = "…."
84+ $server_name = "server_instance" #replace with your SQL Server instance
8585 Sqlcmd -S $server_name -E -Q "SELECT name, state_desc, encryption_algorithm_desc, protocol_desc, type_desc FROM sys.database_mirroring_endpoints"
8686 ```
8787
8888 Run the below command if you suspect that endpoint is not responding to connections or is not running.
8989
90- ``` SQL
91- ALTER ENDPOINT hadr_endpoint
92- STATE = stopped
93-
94- ALTER ENDPOINT hadr_endpoint
95- STATE = started
96- ```
97-
90+
91+ ``` PowerShell
92+ $server_name = "server_instance" #use your SQL Server instance here
93+ $server_name = "hadr_endpoint" #replace with your endpoint name
94+ Sqlcmd -S $server_name -E -Q "ALTER ENDPOINT hadr_endpoint STATE = stopped"
95+ Sqlcmd -S $server_name -E -Q "ALTER ENDPOINT hadr_endpoint STATE = started"
96+ ```
97+ > [ !WARNING]
98+ > Running the command with ` STATE = stopped ` will stop your endpoint and interrupt Always On traffic flow.
99+
100+
101+
98102- There are network /connectivity issues or Ports are blocked at the firewall
99103
100104 Use the following commands to test connectivity in both directions from Node1 to Node2 and Node2 to Node1:
0 commit comments