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

Article translations Article translations
Article ID: 839269 - View products that this article applies to.
Expand all | Collapse all

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.

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.

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.
      Collapse this tableExpand this table
      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.

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.

STATUS

This behavior is by design.

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

Properties

Article ID: 839269 - Last Review: December 9, 2005 - Revision: 4.3
APPLIES TO
  • Microsoft SQL Server 2000 Standard Edition
  • Microsoft SQL Server 2000 Desktop Engine (Windows)
  • Microsoft SQL Server 7.0 Standard Edition
  • Microsoft SQL Server, Desktop Edition
  • Windows XP Embedded
  • Microsoft SQL Server 2005 Developer Edition
  • Microsoft SQL Server 2005 Enterprise Edition
  • Microsoft SQL Server 2005 Express Edition
  • Microsoft SQL Server 2005 Standard Edition
  • Microsoft SQL Server 2005 Workgroup Edition
Keywords: 
kbtshoot kbconnectivity kbfirewall kbclientserver kbsqlclient kbserver kbnetwork kbinput kberrmsg kbprb KB839269

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com