Sql denied access? Prompt SQL Serve does not exist or access denied

  

sql denies access, prompts "SQL Server does not exist or access is denied" failure is usually one of the most complex failures. So how to solve the problem of sql denied access? Cause sql to refuse access for more reasons. The SQL Server name or IP address is spelled incorrectly; the wrong configuration of the server network configuration and the wrong configuration of the client network will cause the above failure. When troubleshooting this problem, it is recommended to follow the steps below:

1. Check the network physical connection

Use the Ping command to test the server IP address or server name. If the IP address of the ping server fails, the physics is indicated. There is a problem with the connection. In this case, check the hardware devices (such as network cards, switches, routers, etc.). Another possibility is that the firewall may block the response to requests such as Ping and Telnet due to the firewall software installed between the client and the server. When checking connectivity issues, it is recommended to temporarily disable the firewall software or open all blocked ports.

If the Ping server IP address is successful and the Ping server name fails, the name resolution is faulty. Sometimes the SQL server and the client do not belong to the same network segment. In this case, the server name may not be directly used to identify the server. However, name resolution can also be performed with the help of the HOSTS file. Open the HOSTS file with the "Notepad" program (the file is usually located in %SystemRoot%system32driversetc), and add a corresponding record of the IP address and server name (such as 10.115.223.188 hanjiangit).

2. Use the Telnet command to check the working status of the SQL Server server.

Execute the command “ Telnet server IP address: 1433”, if the command is executed successfully, you can see that the cursor flashes in the upper left corner after the screen flashes. This indicates that the SQL Server server is working properly and is listening. TCP/IP connection on port 1433; if the command returns "Unable to open the connection" error message, the server does not start the SQL Server service, or the server does not use TCP/IP, or the server does not have the default port 1433 in SQL Server. Listening on.

3. Check the network configuration on the server side on the SQL Server server.

It is generally necessary to check if named pipes are enabled and if TCP/IP lights are enabled. This operation can be implemented using SQL Server's own "Server Network Utility":

Step 1, click “Start”→“All Programs”→Microsoft SQL Server→“Server Network Utility", open the “SQL Server Network Utility” dialog box. From this dialog you can see which protocols are enabled on the server. In general, named pipes and TCP/IP should be enabled, as shown.
SQL Server Network Utility

Step 2, select the TCP/IP option in the "Enable Protocols" list box and click the "Properties" button to open hanjiangit-TCP/IP Dialog. In this dialog box, check the default port settings of the SQL Server service. By default, port 1433 is used. If you select the "Hide Server" checkbox, the client will not be able to see the SQL Server server by enumerating the server, thus protecting it. If there is no problem checking, click the “OK" button as shown.
Checking TCP/IP Properties
Step 3, check the network configuration on the server side, and then go to the client to check the client's network configuration. On the computer where the SQL Server client is installed, click Start/All Programs/Microsoft SQL Server/Client Network Utility", and open the “SQL Server Client Network Utility” dialog box. In this dialog box you can see which protocols are enabled on the client. In general, you also need to enable Named Pipes and TCP/IP as shown.
SQL Server Client Network Utility

Step 4, in the "Enable Protocols in Order" list, click to select the TCP/IP option and click the "Properties" button. In the open TCP/IP dialog box, you can check the settings of the client's default connection port, which must be consistent with the server. If there are no problems, click the “OK" button as shown.
Checking the port used by the client

In step 5, click on the "alias" tab in the "SQL Server Client Network Utility" dialog box to configure an alias for the server. The server's alias is the name used for the connection, and the server in the connection parameter is the real server name, which can be the same or different. For example, you can use SQL Server instead of the real server name hanjiangit and use the network library “Named Pipes”. Confirm that the server alias is ok, click the “OK" button as shown.


Configuring SQL Server

By checking and configuring the above parameters, you can basically eliminate the faults mentioned in this example.

Copyright © Windows knowledge All Rights Reserved