I. Problem
In the home advanced edition of Win7, an inaccessible error occurs when accessing SQL Server. For details about the connection and error, see:
Ii. troubleshooting
After learning, we found that the port number of SQL Server has been changed from the default 1433 to a specific value, such as 45000.
Iii. Problem Solving
1. Test the normal access of the Local Machine by setting the ODBC data source, mainly through configuring the client configuration, as shown in
ODBC tests allow normal database access.
2. Open SQL Server again to connect to the Server and still cannot access the Server normally
3. Create a udl file for testing. The procedure is as follows:
3.1 create a text file on the desktop, change its suffix to udl, and double-click it to open. The following configuration page is displayed.
3.2 configuration page
After configuring the connection parameters required by the server, click test connection and the connection is normal.
4. Open SQL Server again to connect to the Server and still cannot access the Server normally
5. Open the SQL Server Configuration Manager, as shown in
The data source created through ODBC can be queried in the alias option, and its port number is configured as 45000. the above description shows that both ODBC and udl methods can be accessed normally, test again. Delete the record in the above alias and find that ODBC and udl methods cannot be accessed correctly. Therefore, we can infer that both ODBC and udl have accessed the server through this alias, but why does SQL Server fail?
Open the SQL Native Client configuration (32) alias and create a new alias, as shown in figure
Alias after creation
After the alias is created in the SQL Native Client configuration (32), the SQL Server is connected to the Server again and the connection is normal.
Iv. Summary
The problem itself is not complicated. When the SQL Server port number is changed, configuring the client alias for connection is a conventional method. However, in this case, it is interesting to note that, when using ODBC and general udl test methods to access the Server, the alias in the SQL Native Client configuration is used, while the SQL Native Client configuration (32-bit) is used for direct connection with SQL Server).
Edit recommendations]