Random SQL Drops - sql

Am seeing an intermittent issue with a production SQL box, with errors returning:
System.Data.SqlClient.SqlException: 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)
Running perfmon shows me that there are a maximum of 15 user connections open - on many occassions we open much more than this in the past. So i think this rules out connections that are left open.
Furthermore this is a production application that has not undergone changes over the past couple of months, and has always run perfectly well.
I am thinking maybe DNS issues, or siwtch issues possibly, as the web and SQL boxes are running on the same network, without firewalls in between.
Can anybody else shed any light.
One another note - the reference to "provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server" - i assume this denotes a connection via named pipes. I actually disabled named pipes earlier in an attempt to force TCP?

Related

Cannot connect to ANY remote SQL Servers from my system

I cannot connect to any remote SQL Server instances from my system. I used to connect them from SQL Server Management Studio. Moreover, I can still connect to the same SQL Servers remotely from another systems (my colleagues' system).
I am getting following 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) (.Net SqlClient Data Provider)
Error Number: 53
Severity: 20
State: 0
I have checked:
Named pipes/TCP is enabled.
Remote connections are allowed.
Windows Firewall is off.
Enabled everything in SQL Server Configuration Manager.
Also, I have tried everything mentioned in this post-
How do I fix the error 'Named Pipes Provider, error 40 - Could not open a connection to' SQL Server'?
But still could not solve my problem. Please suggest any method which allows me to fix this error and connect to the remote servers again.
instead of check whether that server system is working or not, because sometimes if the server system is not working means we are unable to connect to that system

Confused by SQL error documentation, how to find cause?

I tried to login to a remote server and I saw the error given at the link -
http://www.microsoft.com/products/ee/transform.aspx?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=2
Message says -
Message: An error has occurred while establishing a connection to the server. When connecting to SQL Server, 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) (.Net SqlClient Data Provider)
Which is followed by -
Explanation
SQL Server did not respond to the client request because the server is probably not started.
Arent the message and explanation contradicting each other ? Which one is the correct reason for the problem ? How do i find out the REAL source of the problem ?
They don't contradict each other. They just give different possible reasons:
SQL Server doesn't allow remote connections
SQL Server is not started
To fix it, make sure that SQL Server allows remote connections and is started.
Allowing remote connections can be done in the "SQL Server Configuration Manager":
Start that program on the server on which SQL server is installed.
Navigate to "SQL Server Network Configuration" -> "Protocols for "
Double click on the connection type - e.g. Named Pipes - and set "Enabled" to "Yes".
If you are enabling TCP/IP, make sure to also enable each individual IP address on the second tab.
See this blog post for more info.
Thee program you are using is unable to find SQL server on the port/address it expects to.
This is likely either because it is misconfigured, or because SQL server is stopped.
I suggest you open a desktop login to the machine in question, and see if SQL server is running.
There are other potential causes for this problem, as well: network problems, for example.

Unable to connect SSMS, Microsoft SQL Server, Error: 53

SQL Server Management Studio is not connecting on my database server machine at production server.
Whereas production sites accessing database. When I tried to connect database from SSMS, I get this error:
Cannot connect to 111.11.11.11.
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)
(Microsoft SQL Server, Error: 53)
I was using this SSMS last couple of years,n this SSMS is running fine since more then year on production database server n i didn't closed ever, now when i connecting this SSMS but facing this issue, whereas my sites which accessing this database is working fine.
I also tried to access database from sqlcmd but no luck n facing facing this error:
HResult 0x35, Level 16, State 1
Named Pipes Provider: Could not open a connection to SQL Server [53].
Sqlcmd: Error: Microsoft SQL Server Native Client 10.0 : A network-related or instance-specific error has occurred while establishing a connection to SQL Server.
Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online..
I thinks we resolved the issues.
1. Active Directory server was not behaving, so
2. SQL server couldn't run without credentials and
3. they found another SQL server issue and fixed it.
We started looking into the SQL connections that my team had found and it lead us to find that the Active Directory server had basically crashed. It was allowing us to log in however it wasn't able to access the majority of the AD functionality. We ended up rebooting the AD server which corrected the issue however we were still seeing issues with the SQL cluster manager and SQL itself was rejecting connections on a somewhat regular basis.
After the AD server was rebooted we were able to log into the SQL cluster manager but with limited capabilities, since it had been erroring due to the AD issue we restarted the cluster service to see if this would correct the issue. This caused the SQL service to fail over to the passive server and caused SQL to start rejecting even more connections than it had been. The cluster service started working with this restart however the SQL connections were getting worse. We found that the IPv6 protocol was enabled for the SQL service which causes problems, like the ones we were seeing, in SQL clusters, to disable this we had to reboot the 2 SQL servers. We rebooted them one at a time and once they were back up everything was working properly.

SQL Server Timeout

I have a service that talks to local instance of SQL Server. I am getting an error
System.Data.SqlClient.SqlException:
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)
This error happens intermittently. Since this is part of my continuous integration process its painful as I have to carry out whole build process again.
I would like to make this clear that I am not getting the issue every time its random in nature.
Please help me with this.
Have you tried toggling the various connection interfaces via the SQL Server Confoguration tool? I suspect you may be connecting via TCP/IP, which could be the subject of network issues elsewhere. Because you're local to the server, you could disable that interface and force the use of Shared Memory, which should help you troubleshoot the problem.
For more information on the connection types, see http://msdn.microsoft.com/en-us/library/ms187892.aspx

eCommerce desktop dry-run issue

So the situation is that I've d/l nopCommerce and a slew of other web development programs in order to save some cash on my business.
I've created a local server/database with sql anywhere 12, and then run nopCommerce with VS2010 to begin the install, but receive this error message when attempting to connect with the server:
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)
I've also ran the same db in VS and tried running it that way, while nopCommerce asks for a server name, I've tried many to no avail.
Checked spelling, I'm running everything local, so none of this makes sense.
All help is appreciated.
Have you enabled Named Pipes protocol for your SQL server?