Aug 22, 2011
tom

How do I configure SQL Server 2005 to accept a connection to a private or internal IP address on a private network?

Question

I’m in unfamiliar territory, but here’s the scenario:
I have an application server and a database server, and both are on a private network. How do I allow connections from my app server to the database server using an internal (or private IP if that’s the same thing) IP instead of a WAN IP in the connection string? I apologize if my terminology is wrong or confusing, but I’m at a loss and need to get rid of the Error: 40 named pipes error that’s been plaguing me. Thanks for all of you help.

Answer

Ensure SQL Server is listening on the private IP using SQL Server configuration Manager.

  1. Expand SQL Server Network
    Configuration
  2. select the instance
  3. On the right hand right-click the
    TCP/IP protocol
  4. Select Properties
  5. Ensure your private IP in the list
    is Enabled. Example is below (the xxx should be a real IP address)

alt text

Ensure it’s using the private IP to connect to the server.
Do a traceroute to the db from the web server and see what path it takes. Does it go via the private IP? If your webserver is multi-homed, you may need to add in some statics routes with the ROUTE -p ADD command to ensure it travels via the private network to get to the database server.

To solve the named pipes error, check the following:

  • That the TCP/IP in SQL Server
    configuration Manager is enabled
  • That windows/network firewalls are
    not blocking your web server from
    connecting to your db server for SQL
    (default instance is TCP port 1433)
  • That Allow Remote Connections is
    turned on for SQL Server

Related posts:

  1. Should I ever configure a host with a public IP address to accept traffic from a private IP address?
  2. How to allow TCP connection over the network to SQL Server 2008 Express?
  3. Native client connection from IIS to SQL Server 2005 through firewall takes over 30 seconds
  4. SQL Server 2005 Connection Issue
  5. How do I configure Windows Server 2008 R2 to be a forward proxy for my private network?

Leave a comment