SQL SERVER – FIX: Msg 35250 – The Connection to the Primary Replica is Not Active. The Command Cannot be Processed

Earlier I wrote a blog on same error message which you can read from below link. SQL SERVER – FIX: Msg 35250, Level 16, State 7 – The Connection to the Primary Replica is Not Active. The Command Cannot be Processed

One of my blog readers emailed me that he is getting same error 35250 (The Connection to the Primary Replica is Not Active. The Command Cannot be Processed.)

But he did not see “Database Mirroring login attempt by user” in the SQL Server ERRORLOG. He told me that my blog didn’t help me.

I reached him back via email and provided few steps to check. First, I asked to run below query to get port and service account details.

SELECT tep.NAME 'Endpoint Name'
	  ,sp.NAME 'Owner'
	  ,tep.state_desc 'State'
	  ,tep.port 'Port'
FROM sys.tcp_endpoints tep
INNER JOIN sys.server_principals sp ON tep.principal_id = sp.principal_id
WHERE tep.type = 4

Here was the output and this tells me that they are using the default port for Always On availability groups.

hadr_endpoint, database_mirroring, started, 5022

As a next step, I asked him to do two more things.

  1. Telnet <Primary replica> 5022 from secondary replica via command line (cmd.exe).
  2. Telnet <Secondary replica> 5022 from primary replica via command line (cmd.exe).

Telnet from the primary to the secondary worked, but it failed from the secondary to the primary. He was smart enough and tried to ping the IP address, but that did not work as well.

WORKAROUND/SOLUTION

Based on our test we concluded that this was an issue with network component. My client engaged his networking experts and found the cause of ping failure and fixed it.

Have you seen such error and found some more solution?

Reference: Pinal Dave (https://blog.sqlauthority.com)

Menu
Exit mobile version