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

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.


Solution 1:

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
(source: yfrog.com)


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

Solution 2:

The SQL Server should be listening on whatever IP addresses the server it's install on has. You should then be able to connect via that IP address. Can you post your the connection string you are trying (without the password)?

When you ping the SQL Server by name what IP address are you getting?