Last post Apr 16, 2010 09:14 PM by Waqar_ali
Apr 16, 2010 08:24 PM|royalhale|LINK
We have a sql server 2005 database with a name like server/name. The connection string looks like
<add name="PPDF" connectionString="Data Source=server\name;User Id=id;Password=pwd;Initial Catalog=database"/>
We use this same connection string on two other servers with no problems but we are now trying to connect from another server. The error we are getting is
We are using .net 2 for our web apps on all these servers. I am able to connect to a sql server 2008 database from this server. Is there some configuration I am missing to get this to work?
Apr 16, 2010 09:14 PM|Waqar_ali|LINK
1) Make sure your server name is correct, e.g., no typo on the name.
2) Make sure your instance name is correct and there is actually such an instance on your target machine.
3) Make sure the server machine is reachable, e.g, DNS can be resolve correctly, you are able to ping the server (not always true).
4) Make sure SQL Browser service is running on the server.
5) If firewall is enabled on the server, you need to put sqlbrowser.exe and/or UDP port 1434 into exception.
Once you are done the steps, you should not see this error message anymore. You may still fail to connect your SQL server, but error message should be different and you have a different issue now. [Update: If it still fails, you may replace server\instance
with tcp:server\instance and/or np:server\instance and see if it succeeds with either TCP or NP protocol. That way, you can isolate the issue a little bit. ]
There is one corner case where you may still fail after you checked step 1)-4). It happens when a) your server is a named instance on cluster or on a multi-homed machine, and b) your client is a Vista machine with Firewall on.