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
<Server IP Address/Server Name>
If you ping <Server IP address>
If the connection fails, the physical connection is faulty. In this case, check the hardware devices, such as the NIC, hub, and vro.
Another reason may be that the client and server are installed with firewall software, such
The ISA Server. firewall software may block Ping, telnet, and other responses.
Therefore, when checking for connection problems, we must temporarily disable the firewall software or open all closed ports.
If Ping
<Server IP address> Ping <Server Name> failed
It indicates that there is a problem with name resolution. In this case, check the DNS
Whether the 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 server ==============
Telnet <Server IP addresses> 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 to port 1433
TCP/IP connection
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.
Then, we will go to the server and check whether the named pipe is enabled and whether TCP/IP is enabled.
Protocol, etc. ==================
SQL Server's built-in server network tools can be used for inspection.
Click: program -- Microsoft SQL Server -- server network usage Tool
After you open the tool, you can see which protocols are enabled on the server in "General.
In general, we enable Named Pipes and TCP/IP protocols.
Dianzhong
Select "properties" for TCP/IP protocol. We can check the default port settings of the sqk Server service.
In general, we use SQL
The default port 1433 of the server. If "Hide server" is selected, it means that the client cannot see this server by enumerating the server, which protects the server but does not affect the connection.
============== Next we will go to the client to check the network configuration of the client ================
We can also use the client network tools provided by SQL Server to perform checks,
The difference is that this tool is run on the client this time.
Click: program -- Microsoft SQL Server -- client network usage Tool
After the tool is enabled, You can see which protocols are enabled on the client in the "General" item.
In general, we also need to enable the named pipe and TCP/IP protocol.
Click TCP/IP protocol and select "properties" to check the default connection port settings of the client. The port must be consistent with the server.
Click the "alias" tab and configure the alias for the server. The server alias is the name used for connection,
The server in the connection parameter is the real server name. The two can be the same or different. The alias settings are similar to those in the hosts file.
Through the above checks, the first error can be basically ruled out.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.