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 trying to diagnose an issue at a customer site. They are receiving the following error:

A network-related or instance-specific error occurred while establishing a connection to SQL Server

I've seen this a few times, but only during the initial setup - it's often caused by one of the following:

  • The database server is turned off
  • The network connection between the database server and the application is closed or somehow blocked (e.g. a firewall)
  • The SQL Server instance is not set up to receive remote connections from the application server (e.g. TCP is turned off, remote connections are disabled, or the "SQL Server Browser" service is stopped/disabled)

However, if I assume that no configuration changes have been made, I'm trying to postulate on what the reason might be for getting this error at a random point after the initial setup. My initial thought is:

  • SQL Server machine has run out of resources (e.g. RAM) and is unable to accept new requests from the application server

Is this a valid theory? What other possible causes are there of this error that are not related to the initial setup of the server / application connection? Or is it simply impossible that this error could occur without a configuration change having been made (either on the SQL Server side, application side, or somewhere in-between (network))?

NOTE: I believe this question differs from the plethora of questions related to this error message because the application and server have been talking to each other quite happily until now (most, if not all, other questions seem to relate to initial setup).

UPDATE: Just to update; this particular issue turned out to be caused by the customer having changed the configuration of the application (effectively meaning the connection string was incorrect).

share|improve this question
    
The SQL Server Browser service isn't required to be running in order to make connections to SQL over the network. –  joeqwerty Apr 3 '12 at 10:41
    
Does the database have autogrow, autoshrink or autoclose enabled? I'm wondering if perhaps the database has now grown to a point where autogrowth is occuring regularly and causing connection attempts to time out. –  Chris McKeown Apr 3 '12 at 10:56
    
@joeqwerty Thanks for your input. However, I think you may have missed the point of my question... –  LordScree Apr 3 '12 at 11:03
    
@ChrisMcK Thanks, I'll check and let you know. Would I not get a different error message for connection timeouts? –  LordScree Apr 3 '12 at 11:04
    
@LordScree I did think that too but it's still worth checking. Is there anything in the SQL logs on the server too? –  Chris McKeown Apr 3 '12 at 11:07

1 Answer 1

up vote 1 down vote accepted

it might be one of the possibilities bellow :

  1. SQL server browser stopped (if the DB is used with server name & instance , if it's used directly on the IP it doesn't matter )
  2. Firewall ( this can be checked with telnet on the port -1433 default)
  3. Server not accepting connections (check in sql server management or mmc sql server settings)
  4. Incorrect credentials ( see in the windows event log if you get an error )
  5. Incorrect route- port not forwarded (if there is a router between them ) first check tracert -to that IP , have a check with the network guy :).
share|improve this answer
    
In the assumption that these are the only possible causes of this error, I'll just accept your answer. Cheers. –  LordScree Apr 3 '12 at 12:35

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.