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.
Microsoft SQL Server 2005* ASP.NET Applications
Last Comment
ozonepark
8/22/2022 - Mon
lcohan
This may be due to some DNS (or firewall) issue - did you tried connecting to it via the IP instead?
ozonepark
ASKER
All of our apps connect to the SQL database via IP.
lcohan
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:
This was the first thing we did to rule out the issue. Port 1433 is open.
lcohan
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?
ozonepark
ASKER
No updates or deployment. They just stopped working yesterday afternoon.
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
ozonepark
ASKER
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)
lcohan
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