1

SQL SERVER 2008 R2 When attempting to connect to the default instance of sqlserver on our local server from SSMS on my desktop I'm receiving the following error.

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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 5)

  1. I've verified that the server is set for remote connections inside the instance - properties - connections.
  2. I've verified that TCP\IP and Named Pipes are enabled under Configuration Manager - sql server network configuration - protocols for MSSQLSERVER
  3. I've verified that the browser service is running and that the sql server service is running.
  4. I've verified that the 1433 port is opened in the windows firewall.

I'm not sure what else to check. I'm using the correct servername. If I attempt to connect using IP address I get the following error.

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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 5)

Any help would be appreciated.

8
  • and you can ping the name/IP address from your desktop?
    – user507
    Dec 13, 2011 at 17:15
  • I can ping the server using both name and ip address.
    – Lumpy
    Dec 13, 2011 at 18:09
  • Which OS is it running on? You mention 1433 is open on firewall, this should be outbound rule on the server. To eliminate the firewall you could disable it JUST for testing (if appropriate) and try to connect..
    – VDMT
    Dec 13, 2011 at 18:29
  • ok. I disabled the firewall and tried again but I'm still receiving the error. OS = Windows Server 2008 R2 Standard.
    – Lumpy
    Dec 13, 2011 at 19:33
  • Can you connect locally on the server with no errors?
    – user507
    Dec 13, 2011 at 21:52

2 Answers 2

0

Have you verified that this SQL Server is actually listening on port 1433? If SQL Server is listening on another port, and the browser service is disabled, you won't be able to connect.

3
  • The browser service is running. When I check the TCP/IP protocol it has 1433 listed as the port.
    – Lumpy
    Dec 13, 2011 at 18:16
  • hmmm the windows application log says its listening to 1434 though... Thats the udp default right? Do I need to open the udp port in the firewall? or is there a way to force it to use the tcp/ip port?
    – Lumpy
    Dec 13, 2011 at 18:21
  • @Lumpy SQLBrowser listens on UDP 1434.
    – Matt M
    Dec 13, 2011 at 21:54
2

Try to run telnet from your local machine and use the following from command line

telnet [servername/ip] port

ex:> telnet sql01 1433

This will at least verify that you can hit the server on the specified port. As well your local machine could have a firewall enabled or perhaps a 3rd party application that could be blocking your access?

You can consider it a successful test if after pressing ENTER your command window goes blank. (It has successfully started the telnet session - type some random characters to go back to your normal DOS prompt).

A failure would look like this:

Connecting To sql01...Could not open connection to the host, on port 1433: Connect failed

2
  • I dont really know telnet but when I run the command (swapping the servername with sql01) the cmd screen goes black and just sits there for about 30 seconds then takes me back to a prompt.
    – Lumpy
    Dec 14, 2011 at 13:32
  • the way I worded that is a little confusing. I ran the command telnet <my servers name> 1433
    – Lumpy
    Dec 14, 2011 at 13:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.