Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

up vote 2 down vote accepted

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
share|improve this answer
    
Thank you that helped alot! –  mkelley33 Aug 27 '09 at 2:39

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?

share|improve this answer
    
Its been taken care of, but thanks for the assistance! –  mkelley33 Aug 27 '09 at 2:40

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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