3

Every 2-3 days, my Windows Server 2003 R2 Enterprise box which is hosting a .NET web app will start having an issue. The .NET app stops being able to connect to the SQL server with this error:

An error has occurred while establishing a connection to the server.

(provider: Named Pipes Provider, error: 40 – Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 5)

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 – Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 1326)

After a reboot of the server, everything works fine. I checked RAM, open connections on SQL server, etc, and nothing seems out of wack.

Any ideas?

Strangely I am seeing events like this mixed in the mass of SQL Connection error events that I posted above:

This instance of SQL Server has been using a process id of 44552 since 7/6/2010 12:07:27 PM (local) 7/6/2010 4:07:27 PM (UTC).

But there is no SQL Server installed on this server?? Also after reboot there are many messages about SQL Server starting back up and stuff.

I take that back, there are processes running like MSSQLSERVER... but why? It's not installed.. don't see any way of removing it either.

  • Is SQL running on the same box, or is it a separate machine? – Chris S Jul 9 '10 at 16:29
  • separate machine, both VMs on the same hardware, other web app VMs do not have this issue – MetaGuru Jul 9 '10 at 16:31
1

That error is generic, and just means you can't connect to SQL. Is there anything else in the server event logs?

Just a stab in the dark, but if a reboot fixes the issue, then are your TEMPDBs filling the hard drive?

  • If TEMPDB fills up the discs, and can not expand any further, it will complain vigorously to the SQL log. I'd also be surprised if it caused a connectivity issue. – Peter Schofield Jul 9 '10 at 16:45
  • well it's not reboot of the SQL server that fixes it, it's a reboot of the application server – MetaGuru Aug 26 '10 at 19:27
0

I once had a similar issue on a SharePoint development box that I used. It had a local instance of SQL Server Express (Visual Studio installed it) running and for some reason that caused it to have issues connecting to the instance of SQL Server that was running SharePoint, which was on another box entirely. It made no sense to me at all. But when I disabled the local SQL instance I never had the issue again.

Make sure that instance is not being used, then disable it via services.msc

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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