Error SQL Mirroring configuration "The server network address "TCP://xxxx:5022" can not be reached or does not exist"

Piseth Ben 1 Reputation point
2021-03-18T06:52:14.27+00:00

Hello All, I faced an issue while trying to configure SQL mirroring. Here is the message error:

====================================

The server network address "TCP://xxxx:5022" can not be reached or does not exist. Check the network address name and that the ports for the local and remote endpoints are operational.

Here is the statement that I run set partner on primary, and got the error.

===================================

USE MASTER; GO ALTER DATABASE ADP SET PARTNER = 'TCP://xxxx:5022' GO

Note: I already run set partner on standby.

Thanks, Piseth

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,318 questions
{count} votes

3 answers

Sort by: Most helpful
  1. CarrinWu-MSFT 6,866 Reputation points
    2021-03-19T07:56:51.987+00:00

    Hi @Piseth Ben ,

    This error happens when the server network endpoint did not respond because the specified server network cannot be reached or it does not exist. You could check the following items once:

    1. Goto services.msc and check the sql server is running under which account. Make sure that sql server and sql server agent services should run with same credentials.
    2. in the mirror database server you should do the same step as step 1. Give the same credentials as in principal server. If that user is not present create a new one on the both servers with same credentials.
    3. Now got principal server and in sql server add the new login under Security-->Login. Give the server roles as Sysadmin and public. Add the same user on the mirror server also.
    4. Now do the mirror in the principal database. You did not get any error there.

    Please refer to How to resolve Error: 1418 in sql server while mirroring to get more details.

    Best regards,
    Carrin


    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

  2. Erland Sommarskog 106.5K Reputation points
    2021-03-18T22:56:47.117+00:00

    So is the other machine listening on port 5022?


  3. Ben Miller (DBAduck) 956 Reputation points
    2021-03-21T15:04:10.207+00:00

    Make sure of the following 2 things.

    Endpoint is started on the server that you want to connect to.
    Firewall ports are open between the 2 servers for 5022.

    If these are fixed, then we can go from there. Does not exist indicates that it cannot see it, so either the port is wrong on the receiver or the firewall is blocking it.

    0 comments No comments