Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
d.brophy
Starting Member
4 Posts |
Posted - 2011-02-14 : 05:03:34
|
Hi,I've just upgraded our main database server for a large website. We have three IIS web servers in an NLB configuration accessing a single SQL server. The old DB server was SQL Server 2005 running on Windows 2003 x64. The new DB server is SQL Server 2005 running on Windows 2008 R2 x64.Everything works perfectly, except I will get a:"Named Pipes Provider, error: 40 - Could not open a connection to SQL Server"... error intermittently. It happens maybe 5 times a day. The error only happens on one of the three web servers. Once the error starts happening, that web server is unable to connect to the database until the error has passed. The error will clear itself after about an hour. Running iisreset on that server also clears the error.This error never happened on the old database server, and the configuration of the web servers hasn't changed.I can't find any talk about this error being intermittent on the web. Any help would be much appreciated. |
|
Lumbago
Norsk Yak Master
3271 Posts |
Posted - 2011-02-14 : 05:18:20
|
Well, I assume you have googled the error message? There are ton's of links on this issue.What does your connection string look like? Are you using the native client? Since this happens only occasionally and only from one of the servers my "default" answer would be to check the network interfaces on this server. But since the server recovers after doing an iisreset I'd also probably reinstall the sql server native client and maybe even reinstall iis if the error still hasn't gone away. Just my 2 cents...- LumbagoMy blog-> http://thefirstsql.com/2011/02/07/regular-expressions-advanced-string-matching-and-new-split-function-sql-server-2008-r2/ |
|
|
d.brophy
Starting Member
4 Posts |
Posted - 2011-02-14 : 05:35:40
|
Hi,There's tons of help on that error message but I've spent a couple of hours reading through posts and nothing I can find is relating to it as an intermittent problem. Most of the posts are debugging basic connectivity issues.Since I'm using the same version of SQL server on the new server, I had hoped the web servers wouldn't need any config changes. I'm not sure what Native Client is - I'll investigate that.The connection string is:Data Source={ip};Initial Catalog={database}; user id={user}; password={pass}; |
|
|
d.brophy
Starting Member
4 Posts |
Posted - 2011-02-14 : 05:59:11
|
OK it looks like Native Client wasn't installed on the web servers. I've installed it.Do I have to do anything to enable it? There doesn't seem to be any configuration I can see. Maybe change my connection string? Is there any way to know if it's running? I've run iisreset but I'm thinking maybe I should reboot them too... |
|
|
Lumbago
Norsk Yak Master
3271 Posts |
Posted - 2011-02-14 : 06:51:29
|
I assume you are testing this before putting it in to production, right?? To ensure that you're using the native client you can add "Provider=SQLNCLI;" to the connection string. Just make sure to test it properly first...- LumbagoMy blog-> http://thefirstsql.com/2011/02/07/regular-expressions-advanced-string-matching-and-new-split-function-sql-server-2008-r2/ |
|
|
d.brophy
Starting Member
4 Posts |
Posted - 2011-02-14 : 07:23:53
|
OK apologies for not knowing the basics here... It looks like I'm using SqlConnection in my code, so I don't need Native Client. Is that right? |
|
|
|
|
|
|
|