SQL SERVER – The server network address “TCP://SQLServer:5023” 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. (Microsoft SQL Server, Error: 1418)

While doing SQL Mirroring, we receive the following as the most common error:

The server network address “TCP://SQLServer:5023” cannot be reached or does not exist.
Check the network address name and that the ports for the local and remote endpoints are operational.
(Microsoft SQL Server, Error: 1418)

The solution to the above problem is very simple and as follows.

Fix/WorkAround/Solution: Try all the suggestions one by one.

Suggestion 1: Make sure that on Mirror Server the database is restored with NO RECOVERY option (This is the most common problem).

Suggestion 2: Make sure that from Principal the latest LOG backup is restored to mirror server. (Attempt this one more time even though the full backup has been restored recently).

Suggestion 3: Check if you can telnet to your ports using command TELNET ServerName Ports like “telnet SQLServerName 5023”.

Suggestion 4: Make sure your firewall is turned off.

Suggestion 5: Verify that the endpoints are started on the partners by using the state or state_desc column the of the sys.database_mirroring_endpoints catalog view. You can start end point by executing an ALTER ENDPOINT statement.

Suggestion 6: Try the following command as one of the last options.

GRANT CONNECT ON ENDPOINT::Mirroring TO ALL

Suggestion 7: Delete the end points and recreate them.

If any of above solutions does not fix your problem, do leave comment here. Based on the comment, I will update this article with additional suggestions.

Please note that some of the above suggestions can be security threat to your system. Please use them responsibly and review your system with security expert in your company.

Reference: Pinal Dave (https://blog.sqlauthority.com), Many thanks to Solid Quality Mentors ) for their valuable suggestions.

SQL Error Messages, SQL Mirroring, SQL Scripts
Previous Post
SQLAuthority News – Download – Microsoft Sync Framework Power Pack for SQL Azure November CTP (32-bit)
Next Post
SQL SERVER – Fragmentation – Detect Fragmentation and Eliminate Fragmentation

Related Posts

165 Comments. Leave new

  • Hi,

    I tried with all above steps. But i got the same issue..Can any help me please..!!

    Error: “The server network address “TCP://servername: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. (Microsoft SQL Server, Error: 1418)”

    Thanks,
    Laxman

    Reply
  • This is a great guide.

    In my case, the comment (Make sure that SQL service account is listed as a “Administrator” – Local account) solved my problem.

    Thanks to everyone.

    Reply
  • In my case, I got the same error after pressing the ‘murror’ button. Tried al tips but nothing helped. Found the following error in the event viewer:

    Database Mirroring login attempt failed with error: ‘Connection handshake failed. There is no compatible encryption algorithm. State 22.’. [CLIENT: xxx]

    When I executed the following query on both, the principal and the mirror:

    select * from sys.database_mirroring_endpoints

    I found out that in the column “encryption_algorithm_desc”, the value for the principal was “RC4” and the value for the mirror was “NONE”.

    Guess these values need to be the same! Good luck all.

    Reply
  • hi guys
    From my experience add all services particularly mirror and principal sql instances under
    domain account and with sysadmin rights in sql server. Add domain user account as part of local administrator group in each instance machine

    Reply
  • Pls. ensure if you understand meaning of Failover Partner in the connectionstring in Database Mirror setup as below, then perhaps you can test scenarios with clients using ODBC drivers –

    Reply
  • I had this exact problem. Tried everything you list here and read many guides on the internet and it still did not work. Nothing helped. I did all copying, backing up, etc with the “Microsoft SQL Server Management Studio” and I thought maybe I had to do everything with SQL Transact statements. However, as a last thing to try in “Microsoft SQL Server Management Studio” I tried to connect to the server instances with Authentication set to “SQL Server Authentication” and used the sa account instead of using the default “Windows Authentication”. This solved my problem. Suddenly it just worked.

    Reply
  • electrocucaracha
    September 4, 2011 10:35 am

    I did all the recommendations mentioned before, and I was getting the same error, I made a test creating the mirror using the same server with different instances and works. The principal sql server version, that I was using, was 10.50.1600.1 and the mirror was 10.50.2500.0, I’m not sure if that was a constraint that I don’t take in consideration

    Reply
  • I have tried all the above tricks but still i am getting the error. Can any one please help me.

    Thanks

    Reply
  • I have the same network connection problem. I fix it doing the following:

    1. In Management studio, I connect the Database engine Name : IP ADDRESS
    and Authentication: SQL Server Authentication, User name: sa with sa password.

    2. Then I started mirroring. I left blank the Service account for the Principal and Mirror.

    3. After completing, when the system asked to Start mirroring, I choose No.

    4. Then I changed Server Network Adress Places as: Principal as it is,
    but Mirror: ‘tcp://[ip address]:5022’

    Amazingly, the system started to synchronize.

    By the way I choose ‘Hight Safety’ Operating mode. i.e. no witness.

    If it helpful, just share it.

    Reply
  • Hy,

    I have number error 1456 and witness not working.
    Can u help me pls?

    Thanks

    Reply
  • In witness server:

    1. Search file ‘hosts’ , it is normally found in %system32%/drivers/etc
    2. Open it and Go at bottom of the file
    3. Add the following:
    [Principal server IP address] [Your Principal servername]
    [Mirror server IP address] [Your Mirror servername]
    4. and Start mirroring again.

    You can do the above in Principal and Mirror servers.

    Reply
  • I am about to go crazy here guys. I have tried EVERY suggestion on this page, but I still receive the 1418 error. Any other suggestions would be greatly appreciated. I set this up a couple weeks ago just to test and everything worked fine. I rebuilt the mirror server due to adding additional hard drives and now I can’t seem to get past this error.

    Thanks in advance.

    Reply
  • I tried the following code but am getting same error can any body help me

    USE master
    GO
    ALTER DATABASE MesHun_DBArchival_Original SET PARTNER = ‘TCP://wfist-eorch:9999’;
    GO

    Error:-
    The server network address “TCP://wfist-eorch:9999” 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.

    Reply
  • After dealing with this problem for a long, long time, I solved this problem by using the same approach as Tony mentioned in his post. (Changing the ComputerName.Domain:PortNumber format to IpNumber:PortNumber)

    Remember to do this on BOTH Principal and Mirror fields (and Witness if you’re using one).

    Reply
  • Hi guys please any body can help me out i am facing the same error 1418.

    The steps which I have followed taken full backup along tran log and restored with no recover option and I have added administrator accounts in both primary and mirror.when I am starting I am getting same error..Please help me out

    Reply
  • Hi guys please any body can help me out i am facing the same error 1418.

    The steps which I have followed taken full backup along tran log and restored with no recover option and I have added administrator accounts in both primary and mirror.when I am starting I am getting same error..Please help me out

    Alter failed for database ‘RDCCI’

    The server network address ”TCP://RDCCI-SQLAPPS2.kdcci.org.5022” can not be reached or does not exist. check the network address name that ports for local and remote endpoints are operational (micorosoft sql server error :1418

    Reply
  • I solved this problem.
    Run CMD services.msc
    Changing to SQL server “Log on as a service Properties” is domain user.

    Reply
  • You can also, from the command line, run “netstat -a” and determine if SQL Server is listening on your configured EndPoint port as another way of looking at it. Sometimes that’s helpful.

    Reply
  • Steps 6 does not work. All is not a valid parameter. I even tried my login and it says i cannot grant permissions to myself. how ridiculous, especially since my login is an SQL Admin…

    Not sure how to do step 7. I tried re running the security wizard several times but no change.

    One other big question is, what should be put into the “service Accounts” part fo the wizard? I’m using my domain account for access, but I want to have it run off local accounts. I’ve tried leaving these all blank and tried putting my domain account in there, but no difference! I’ve been using windows auth (ie my domain account) for all the connect parts of the wizard.

    Desperately yours!

    Reply
  • what would be really helpful here is an idiots guide on how to check each option. Iv’ve tried everything on this page several times but still have a 1418 error :-)

    Reply
    • One thing not mentioned in step 3 is, you need to check your Telnet connection BOTH WAYS. From your Principle to Mirror server and from your Mirror back to your Principle. This was my issue. Wish they could put more smarts into the security wizard to check this!

      Reply

Leave a Reply