The main mistake of your screenshot is
An error occurred with the network or a specific instance while establishing a connection to SQL Server. The server was not found or was unavailable. Verify Instance Name and SQL Server
Unfortunately, this is truncated. Typically, the message will continue with "configured to allow remote connections." This may be followed by a specific reason (for example, it may indicate (among other reasons) "provider: SQL Network Interfaces, error: 26 - Server / instance location error")
However, with the message you still have, it looks like a connection problem between the client machine and the SQL Server field. Therefore, I would look at the need for due diligence in front of the SQL Server field and network connection:
- SQL Server name may resolve
- So the server can be reached with ping
- This SQL server is configured to accept remote connections
- That the SQL Browser service is running in the SQL Server box
- What Windows Firewall does not interfere with
- SQL Server itself actually works first
If they pass, you need to confirm that you can log in. I usually use SQL management tools, especially the sqlcmd
command-line sqlcmd
to check for basic communication (for example: sqlcmd -E -S mysqlserver\instance
to connect to the default database or sqlcmd -E -S mysqlserver\instance -d database
database). Obviously, you will need to run them as the user your web application is working with, otherwise they will try to authenticate as you (either use runas
, or run the command line under different credentials [find the command line at the beginning then press shift- right-click → "Run as another user".
However, that ultimately helps, if you can get the full text of the error message (and not the truncated version), then this can help narrow down the specific problem you are facing.
source share