When the Server encounters some minor faults, it always reports that "the connection to SQL Server cannot be opened", as shown below:
An error occurred while establishing a connection with the server. When you connect to SQL Server 2005, the default setting does not allow remote connection to SQL Server may cause this failure. (Provider: named pipeline provider, error: 40-unable to open the connection to SQL Server)
I found some materials and said everything. Some said it was because of the installation of SQL Server 2005, and some said it was because of the built-in string named LocalSqlServer in. NET 2.0 ...... However, my database uses SQL Server 2000 and the operating system is Windows 2003. If SQL Server 2005 is not used and SQL Server 2005 is not installed, You can exclude these factors.
The connection string configuration is correct, and there is no problem in the previous test. The server uses an IP address and can be pinged, which is not the cause of computer name resolution failure.
However, the connection fails if you use telnet [IP address] 1433. According to some documents, it may be related to the installation of the SQL Server 2000 Patch. If the version number is lower than 2039, the above problems may occur. Run the select @ version command to check whether the SQL Server version is 194 and SP4 is not installed.
The dead horse and the active horse doctor, seize a life-saving straw, even if not for this reason, also want to try. After installing SP4, you can connect to it normally. But why? Who knows