none
Problem with SQL connection, error: 26 - Error Locating Server/Instance Specified

    Question

  • I am using Windows 7 Ultimate, Visual Studio 2010 and SQL server 2008 on my PC.

    I build a simple SQL database program with Visual Basic 2010 on my pc and it run smoothly,

    but when I distributed the program to others PC on the same network I got error 26 - Error Locating Server/Instance Specified.

    I have followed the steps in this article :

    http://blogs.msdn.com/b/sql_protocols/archive/2007/05/13/sql-network-interfaces-error-26-error-locating-server-instance-specified.aspx

    but the program still could not connect to my SQL Server if run from other PC.

    When I use the portqry tools I got this report:

    UDP port 1434 (ms-sql-m service): NOT LISTENING

    I have disabled windows firewall.

    Just could not figure it out what went wrong and really appreciate it if someone can help me solve this.

    Thanks.

     

    Thursday, July 15, 2010 4:56 AM

All replies

  • Are you *sure* that you followed the steps in the article that you mention? Note step 4: "Make sure SQL Browser service is running on the server". If SQL Browser is running, it should be listening on port 1434, but your prtqry shows that this port is not being listened on. Go into the Services in control panel and verify that the SQL Browser service is running.

    Note that the article only tells you how to get rid of error 26, but you may still fail to connect to SQL Server if yu have not enabled it to support external connections (which are disabled by default when it is installed). There are two places to check:

    1) In SQL Server Configuration Manager, Network Configuration, verify that the TCP/IP protocol is enabled. [As an aside, here you can assign a fxed port to your named instance if you do not want to use the Browser service].

    2) Use Sql Server Management Studio to open the Properties of the server, and in the Connections tab verify that "Allow remote connections to this server" is checked.

     

    • Proposed as answer by Kalman Toth Saturday, July 17, 2010 8:05 AM
    Thursday, July 15, 2010 7:01 AM
  • Yes I have verified that SQL Browser is running and allow remote connections server is checked but still I could not connect to SQL server from other PC.
    Tuesday, July 20, 2010 8:26 AM
  • If you run "portqry" on the machine where SQL Server is running, do you see a response? Please confirm that you still get an error 26, otherwise it is a different issue.
    Thursday, July 22, 2010 9:46 PM