locked
Error 26 - Error locating server/Instance Specified RRS feed

  • Question

  • Server OS :Windows Server 2008 R2

    Database : SQL Server Express 2008

    Connection String : Data Source=CompABC_System_SVR\CompABC_SQLEXPRESS;INITIAL CATALOG=CompABC;UID=uSystem;PWD=user@2008;

    There is two client is connecting to this database. Only 1 of the client is successful connected to this database(CompABC), the others one is fail to connect to CompABC Database. This two client is using same connection string to connect to the database. Error message as below:

    Error Message:

    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)

    Sunday, August 18, 2013 5:38 AM

Answers

  • How to check which port they is using for each client?

    as i know all these client is using only single connection string to connect.

    I suppose you will be using default port 1433.You can check it in SSCM--protocols--rk --properties..and then you can see.

    or see this link http://benchmarkitconsulting.com/colin-stasiuk/2009/02/02/what-tcp-port-is-sql-server-running-under/

    On same port AFAIK two different applications cannot connect.


    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

    • Proposed as answer by Sofiya Li Monday, August 19, 2013 2:06 AM
    • Marked as answer by Sofiya Li Thursday, August 22, 2013 1:33 PM
    Sunday, August 18, 2013 7:26 AM
  • This two client is installed same application. I wonder is why only 1 client is able to connect to system another client is unable to connect and prompt up error 26.

    I assume both clients are connecting remotely.  I suggest you verify host name resolution and network connectivity with: PING CompABC_System_SVR

    If the PING succeeds, find the dynamic port the CompABC_SQLEXPRESS named instance is listening on.  This will be listed in the SQL Server error log and visible in the SQL Server Configuration tool.  Using that port number, you can TELNET from the client machine to verify the remote host and port is reachable:  TELNET CompABC_System_SVR <port-number-here>

    If you don't have TELNET installed, you can use the following PowerShell command, again substituting <port-number-here> with your actual port number.

    <port-number-here> | % { echo ((new-object Net.Sockets.TcpClient).Connect("YourServerName",$_)) "server listening on TCP port $_" }

    If the port connectivity check fails, there is likely a firewall blocking the port from the problem client.


    Dan Guzman, SQL Server MVP, http://www.dbdelta.com

    • Proposed as answer by Sofiya Li Monday, August 19, 2013 2:05 AM
    • Marked as answer by Sofiya Li Thursday, August 22, 2013 1:33 PM
    Sunday, August 18, 2013 3:56 PM
    Answerer

All replies

  • Are they connecting using same post or different port ?

    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

    Sunday, August 18, 2013 5:53 AM
  • How to check which port they is using for each client?

    as i know all these client is using only single connection string to connect.

    Sunday, August 18, 2013 6:10 AM
  • How to check which port they is using for each client?

    as i know all these client is using only single connection string to connect.

    I suppose you will be using default port 1433.You can check it in SSCM--protocols--rk --properties..and then you can see.

    or see this link http://benchmarkitconsulting.com/colin-stasiuk/2009/02/02/what-tcp-port-is-sql-server-running-under/

    On same port AFAIK two different applications cannot connect.


    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

    • Proposed as answer by Sofiya Li Monday, August 19, 2013 2:06 AM
    • Marked as answer by Sofiya Li Thursday, August 22, 2013 1:33 PM
    Sunday, August 18, 2013 7:26 AM
  • This two client is installed same application. I wonder is why only 1 client is able to connect to system another client is unable to connect and prompt up error 26.
    Sunday, August 18, 2013 9:48 AM
  • Error numer 26 suggests that the client tries to connect using Named Pipes. I would check using SQL Server Config Manager on the client machine. Remember tht the configs are separate for 32 vs 64 bit apps.

    Tibor Karaszi, SQL Server MVP | web | blog

    Sunday, August 18, 2013 3:19 PM
  • This two client is installed same application. I wonder is why only 1 client is able to connect to system another client is unable to connect and prompt up error 26.

    I assume both clients are connecting remotely.  I suggest you verify host name resolution and network connectivity with: PING CompABC_System_SVR

    If the PING succeeds, find the dynamic port the CompABC_SQLEXPRESS named instance is listening on.  This will be listed in the SQL Server error log and visible in the SQL Server Configuration tool.  Using that port number, you can TELNET from the client machine to verify the remote host and port is reachable:  TELNET CompABC_System_SVR <port-number-here>

    If you don't have TELNET installed, you can use the following PowerShell command, again substituting <port-number-here> with your actual port number.

    <port-number-here> | % { echo ((new-object Net.Sockets.TcpClient).Connect("YourServerName",$_)) "server listening on TCP port $_" }

    If the port connectivity check fails, there is likely a firewall blocking the port from the problem client.


    Dan Guzman, SQL Server MVP, http://www.dbdelta.com

    • Proposed as answer by Sofiya Li Monday, August 19, 2013 2:05 AM
    • Marked as answer by Sofiya Li Thursday, August 22, 2013 1:33 PM
    Sunday, August 18, 2013 3:56 PM
    Answerer