none
Unable to connect to named instance in SQL Server 2017 RRS feed

  • Question

  • Just installed two instances of the SQL Server 2017 on a VM. One is a default instance and another is a named instance. I can connect to the default instance fine using the SSMS 2017 from my desktop but for some reason, I can't seem to connect to the named instance. But, if I use the designated port number, I can connect to the named instance just fine. What could be the reason? I get the following message after a while

    A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (.Net SqlClient Data Provider)

    I have checked and confirmed the Named Pipes are enabled and the SQL Browser is running as well. I do not see any errors in the error log which I can get to when I specify the port number (ServerName, port). Suggestions?


    NM

    Monday, January 22, 2018 7:56 PM

All replies

  •  error 26 solution1 

       error 26 solution2

     Possible reasons are for example:
    - wrong connection string
    - firewall blocking the traffic   --> inbound and outbound rule is set
    - correct protocol not enabled
    - SQL Server is not running and so on 

    - check event viewer


    https://social.technet.microsoft.com/wiki/contents/articles/37872.sql-server-installation-on-centos-linux.aspx

    Monday, January 22, 2018 8:13 PM
  • Hi NM,

    >> A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (.Net SqlClient Data Provider)

    You may get the above error message only if you are trying to connect to a SQL Server named instance. For a default instance, if we have failed at this stage (i.e. error locating server/instance specified), we will continue to try connect using default values, e.g default TCP port 1433, default pipe name for Named Pipes. 

    To troubleshoot this issue, try to perform the following steps:

    1. Make sure your server name and instance name are correct, e.g., no typo on the name;
    2. Make sure SQL Browser service is running on the server;
    3. Go to SSCM, click properties of SQL Server Browser -> Advanced-> Active “Yes” or “No”, if SQL Server Browser is running but is not active, the service would not serve you correct pipe name and Tcp port info on which your connection depends;
    4. If firewall is enabled on the server, you need to put sqlbrowser.exe and/or UDP port 1434 into exception;

    If you have any other questions, please let me know.

    Regards,

    Hannah

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Proposed as answer by Hannah Yu Friday, January 26, 2018 9:47 AM
    Tuesday, January 23, 2018 3:08 AM
  • Thanks Hannah. It worked perfectly for me after adding UDP port 1434. Earlier i was getting as tried with TCP instead of UDP.
    • Proposed as answer by Times Decides Tuesday, October 29, 2019 5:18 PM
    Monday, October 21, 2019 7:20 PM