Case study of SQL Server connection failure in Windows 7

Source: Internet
Author: User

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]

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.