Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

You may not be able to connect to an instance of SQL Server that is configured to use the Named Pipes server network library on a computer that is running Windows XP Service Pack 2


Symptoms

You may not be able to connect to an instance of SQL Server, and you may receive one of the following error messages.

Error message 1

[Named Pipes]SQL Server does not exist or access denied.
[Named Pipes]ConnectionOpen (Connect()).


Error message 2

Unable to connect to server <SQL Server instance name>

Server: Msg 17, Level 16, State 1
[Microsoft][ODBC SQL Server Driver][Named Pipes]SQL Server does not exist or access denied.

Error message 3

Cannot connect to <SQL Server instance name>
This behavior occurs when you do one of the following:
  • You try to connect to an instance of SQL Server that is installed on a computer that is running Microsoft Windows XP Service Pack 2.
  • You try to connect to an instance of SQL Server that is configured to listen on the Named Pipes server network library only.

↑ Back to the top


Cause

By default, Windows Firewall is enabled on computers that are running Microsoft Windows XP Service Pack 2. Windows Firewall closes ports such as 445 that are used for file and printer sharing to prevent Internet computers from connecting to file and print shares on your computer.

When SQL Server is configured to listen for incoming client connections by using named pipes over a NetBIOS session, SQL Server communicates over TCP port 445, just like file and printer sharing. Therefore, the SQL Server clients that are trying to connect to SQL Server receive the error messages that are mentioned in the "Symptoms" section.

↑ Back to the top


Resolution

To resolve this problem, you must enable the TCP port 445 explicitly. To do this, use one of the following methods.
  • Enable TCP port 445 by changing the network connection settings.

    To do this, follow these steps:
    1. Click Start, and then click Run.
    2. In the Run dialog box, type Firewall.cpl, and then click OK.
    3. In the Windows Firewall dialog box, click the Advanced tab.
    4. Under Network Connection Settings, click your network connection, and then click
      Settings.
    5. In the Advanced Settings dialog box, click Add on the Services tab.
    6. In the Service Settings dialog box, set the values as specified below, and then click OK.
      PropertyValue
      Description of service:SQL Server on Named Pipes.
      Name or IP address (for example 192.168.0.12) of the computer hosting this service on your network:The current IP address of the computer.
      External Port number for this service445
      Internal Port number for this service445

      Note Make sure that the TCP option is selected in the Service Settings dialog box.
  • Enable TCP port 445 by enabling file and printer sharing.

    To do this, follow these steps:
    1. Click Start, and then click Run.
    2. In the Run dialog box, type Firewall.cpl, and then click OK.
    3. In the Windows Firewall dialog box, click the Exceptions tab.
    4. Under Programs and Services, click to select the File and Printer Sharing check box, and then click Edit.
    5. In the Edit a Service dialog box, click to select the TCP 445 check box, and then click OK two times.

↑ Back to the top


Workaround

To work around this problem, you can use the TCP/IP sockets network library. You can create an alias for the computer that is running SQL Server that uses the TCP/IP Sockets library or you can use TCP/IP as the only default enabled protocol. To add a SQL Server alias that uses TCP/IP Sockets library, follow these steps:
  1. Click Start, click Run, type cliconfg, and then click OK.
  2. In the SQL Server Client Network Utility dialog box, click the Alias tab, and then click Add.
  3. In the Add Network Library Configuration dialog box, under Network libraries, click TCP/IP.
  4. In the Server alias box, type the IP address of the computer or the name of the computer that is running SQL Server, and then click OK.

↑ Back to the top


Status

This behavior is by design.

↑ Back to the top


References

For additional information about Internet firewalls, click the following article numbers to view the articles in the Microsoft Knowledge Base:

298804 Internet firewalls can prevent browsing and file sharing

308127 How to manually open ports in Internet Connection Firewall in Windows XP



For additional information about other general causes of the error messages, click the following article number to view the article in the Microsoft Knowledge Base:

328306 Potential causes of the "SQL Server Does Not Exist or Access Denied" error message



For additional information about configuring SQL Server 2000 and Windows XP Service Pack 2, click the following article number to view the article in the Microsoft Knowledge Base:

841249 How to configure Windows XP Service Pack 2 (S) for use with SQL Server

↑ Back to the top


Keywords: kbappliestoyukon, kbyukonsweep, kbtshoot, kbconnectivity, kbfirewall, kbclientserver, kbserver, kbnetwork, kbinput, kberrmsg, kbwiprotr, kbwiproauthor, kbprb, kb, kbsqlclient

↑ Back to the top

Article Info
Article ID : 839269
Revision : 5
Created on : 8/19/2020
Published on : 8/20/2020
Exists online : False
Views : 103