SQL Server troubleshooting

Source: Internet
Author: User

When using SQL Server, the most common problem is that the connection fails. Generally, there are two ways to connect to SQL Server. One is to use the client tools provided by SQL Server, such as the Enterprise Manager, query analyzer, and transaction probe; second, use the client developed by the user Program Such as ASP scripts and vbprograms. The client program uses ODBC or ole db to connect to SQL Server. Next, we will discuss the two Connection Methods in detail how to solve the connection failure problem. 1. "SQL server does not exist or access is denied"
(Figure 1)
"SQL server does not exist or access is denied" errors are usually the most likely to occur, because there are many causes of errors, so there are also many aspects to check. Generally, there are several possibilities: 1. network connection problems; 2. SQL server problems; 3. server network configuration problems; 4. Client network configuration problems. First, check the network connection: 1. Ping the Server IP address. First, shut down the firewall on the server and client to prevent the firewall software from blocking the Ping and telnet responses. Then start to ping the Server IP address. If the ping server ip address fails, the physical connection is faulty. In this case, check the hardware devices, such as the NIC, hub, and vro. 2. Ping the server name. If it fails, the name resolution is incorrect. Check whether the netbuis protocol is installed and the DNS service is normal.
Second, use the Telnet command to check the operating status of the SQL Server server. If the command is successfully executed, you can see that the cursor does not stop 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 connections on 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, or the server has not enabled the TCP/IP protocol, or the server does not listen on the default port 1433 of SQL Server. Finally, we need to check the network configurations of the server and client. The server checks whether the named pipe is enabled, whether the TCP/IP protocol is enabled, and so on. We can use the server network tools provided by SQL Server for inspection. Click Program-Microsoft SQL Server server network usage tool. After the tool is opened, You can see which protocols are enabled on the server in "General, by default, the named pipe and TCP/IP protocol are enabled. Click "properties" in the TCP/IP protocol to check the default port settings of the sqk Server service. Generally, we use the default port 1433 of SQL Server. If you select "Hide server", it means that the client cannot see this server by enumerating the server. This protects the server, but does not affect the connection.
(Figure 2)

(Figure 3)
Next we will go to the client to check the network configuration of the client. We can also use the client network provided by SQL Server to perform the check. The difference is that this tool is run on the client this time. Click Program-Microsoft SQL Server Client. After you use the tool to open the tool, you can see which protocols are enabled on the client in "General. Similarly, we 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.
(Figure 4)

Through the above checks, the first error can be basically ruled out.
 

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.