Applications stopped communicating with SQL 2005

ozonepark
ozonepark used Ask the Experts™
on
Error:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
Verified that all services were started.
Named pipes were enabled.
TCPIP were allowed.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
lcohanDatabase Analyst

Commented:
This may be due to some DNS (or firewall) issue - did you tried connecting to it via the IP instead?

Author

Commented:
All of our apps connect to the SQL database via IP.
lcohanDatabase Analyst

Commented:
OK, so can you try a telnet from the app server where you get this error to see if the SQL server can be reached?

like in cmd prompt run:

telnet 111.222.333.000 1433

without any : and use the actual port if is not running on default TCP port 1433 - obviously replace 111.222.333.000 with the actual SQL IP

you can also run a command like below by that SQL IP to see where is your network broken link:

tracert 111.222.333.000
Introduction to Web Design

Develop a strong foundation and understanding of web design by learning HTML, CSS, and additional tools to help you develop your own website.

Author

Commented:
This was the first thing we did to rule out the issue.  Port 1433 is open.
lcohanDatabase Analyst

Commented:
OK so if the telnet is working fine to IP port 1433 and SQL is running on it so there's no reason why the app cannot connect to that same IP/port number right? Was there any deployment, or windows update in between the time when this was working and current state?

Author

Commented:
No updates or deployment.  They just stopped working yesterday afternoon.
lcohanDatabase Analyst

Commented:
I mean you could try create a ODBC on that app server and "test connection" but that will just proof the SQL is not the issue in this case and I think you need to check app config files and maybe try an IISRESET

Author

Commented:
Modified the app to bypass checking SQL.  The app worked so this showed me that the issue is a connection to SQL.  Checked all of the config files and recycled the app pool as well as rebooted both servers.  (I have a second server with the same apps and I am getting the same error message)
lcohanDatabase Analyst

Commented:
Could you try create a ODBC on that app server using exact same IP/port/credentials and "test connection"?
Also, on the SQL Side  - is there anything error/warning related in the SQL Log files by any chance
Jason clarkDBA Freelancer

Commented:
you may also try to
Restart your MSSQLSERVER service. sometimes it works. Also, check Instance name(.and /)
have a look here: http://www.sqlserverlogexplorer.com/fix-error-message-40/

hope this will help you.
Daniel JonesData Research Analyst

Commented:
  • Enable Named Pipes SQL Config Manager
  • Restart the server SQL Config Manager
  • Use proper server and instance names
Apparently under Windows Server 2008 R2 it is not followed to the letter adding more websites (IP addresses) to the Server which resulted in the primary address no longer being used. There is a known bug that causes this. Only the primary IP is allowed to communicated with the SQL server or other servers in which we allow.  This server is in the DMZ.  It in fact assigned one of the other IPs that have been added that this server starting to use as a primary server IP and only the primary IP is allowed communication.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial