"SQLServer does not exist or access is denied ". 1. Incorrect SQLServer name or IP address spelling 2. Incorrect server network configuration 3. Incorrect Client Network Configuration
"SQL Server does not exist or access is denied ". 1. the SQL Server name or IP address is misspelled. 2. The Server network configuration is incorrect. 3. The client network configuration is incorrect.
Recently, I was working on a project (Asp.net + SQL Server 2000). There was no problem in running it on the originally developed machine. however, when I Debug Programs (local debugging) on another machine, "SQL Server does not exist or access is denied" appears ". I believe that entering such a keyword on any search website will surely get n more pages.
The solutions to the four most common errors in SQL Server connection are as follows:
1. "SQL Server does not exist or access is denied"
This is the most complex. There are many causes of errors and there are many aspects to check.
Generally, there are several possibilities:
1. incorrect spelling of the SQL Server name or IP address
2. The server network configuration is incorrect.
3. The client network configuration is incorrect.
To solve this problem, we generally need to follow the steps below to find out the cause of the error step by step.
============== First, check the network physical connection ================
Ping <服务器ip地址 服务器名称>
If ping <服务器ip地址> If the connection fails, the physical connection is faulty. In this case, check the hardware devices, such as the NIC, HUB, and vro.
Another possibility is that a firewall software is installed between the client and the Server. For example, the ISA Server. firewall software may block the ping and telnet responses.
Therefore, when checking for connection problems, we must temporarily disable the firewall software or open all closed ports.
If ping <服务器ip地址> Ping <服务器名称> Failed
It indicates that there is a problem with name resolution. At this time, check whether the DNS service is normal.
Sometimes the client and server are not in the same LAN. At this time, the server name may not be used to identify the server. At this time, we can use the HOSTS file for name resolution,
The specific method is:
1. Use notepad to open the HOSTS file (usually in C: \ WINNT \ system32 \ drivers \ etc ).
Add a record corresponding to the IP address and server name, for example:
172.1610.24 myserver
2. You can also configure it in the SQL Server Client Network utility, which will be described in detail later.
============ Second, use the telnet command to check the running status of the SQL Server ==============
Telnet <服务器ip地址> 1433
If the command is successfully executed, you can see that the cursor keeps flashing in the upper left corner after the screen flashes. This indicates that the SQL Server is working normally and is listening for TCP/IP connection at port 1433.
If the command returns an error message "unable to open the connection", it indicates that the Server has not started the SQL Server service,
The TCP/IP protocol may not be enabled on the Server, or the Server does not listen on the default port 1433 of SQL Server.