Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQLClient What error numbers are related to SQL Server Connection errors so I can retry

I get the following error with SQLClient. Are there more error numbers than Error Number: -1, 53, 2?

Error Number: -1, Level: 20, State: 0, Line: 0; Message: 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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

Error Number: 53, Level: 20, State: 0, Line: 0; Message: 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)

Error Number: 2, Level: 20, State: 0, Line: 0; Message: 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)

like image 234
datadev Avatar asked Oct 24 '25 03:10

datadev


1 Answers

Please try following link for details of errors

http://technet.microsoft.com/en-us/library/cc645611(v=sql.105).aspx

The error codes are returned by the db server to the sql client.

Update

Try the latest database events and errors here

https://learn.microsoft.com/en-us/sql/relational-databases/errors-events/database-engine-events-and-errors

like image 121
G J Avatar answered Oct 25 '25 16:10

G J