The following error occurred while connecting to the SQL Server 2000 database:
A network-related or instance-specific error occurred while establishing a connection with SQL Server. The server was not found or could not be accessed. Please verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named pipe provider, error:40-cannot open a connection to SQL Server)
When connecting to the SQL Server 2005 database, you are prompted with an error! The error message is as follows!
An error occurred while establishing a connection to the server. When you connect to SQL Server 2005, this failure may be caused by SQL Server not allowing remote connections under the default settings. (provider: Named pipe provider, error:40-cannot open a connection to SQL Server)
I first installed the SQL Server2000 after the installation of SQL Server2005, online there are many solutions!
The following list:
1, in the Start menu, the program inside the SQL Server2005 has a SQL Server2005 peripheral configuration to select the service and connection of the peripheral configuration, in the database engine select remote control, the local connection and remote connection to the simultaneous use of tcp/ IP and named pipes! save. Close the database server link, relink!
2, the configuration file web.config inside the database connection string inside the data source with the local server name, do not use IP or Loacl or.
Cases:
3,iis configuration Deletes the default database link string because the default connection is 2005 after the SQL Server2005 is installed
My Computer, admin, IIS configuration inside the default site, right view properties, asp.net version Select the version you use, and then the edit configuration and edit the global configuration inside the default string link delete!
Modify edit global configuration and edit configuration
The red circle part originally has the default database connection string, removes it!
4, play SQL Server patch
When you look at the database log, you find such a hint!
The Microsoft SQL Server 2000 version you are running or Microsoft SQL Server Desktop Engine (also known as MSDE) and the Microsoft Windows Server 2003 family Enable A known security vulnerability exists. To reduce the computer's attack by some viruses, the TCP/IP and UDP network ports for Microsoft SQL Server 2000,msde or both are disabled. To enable these ports, you must from http://www.microsoft.com/sql/downloads/default.asp or http://www.microsoft.com/china/sql/downloads/ Default.asp Install a hotfix, or the latest service pack for Microsoft SQL Server 2000 or MSDE.
SQL Server 2000 to SP4 patches
Download the patch, hit it!
5, modify the SQL Server2000 remote connection port
When the SQL Server2000 is installed and the SQL Server2005 is loaded, the latter modifies the remote connection port of the former, with the original port of 1433. When I checked it, it was converted to port 1058.
Change it over, change it to 1433!
Start menu, there is a server network use tool under the SQL Server2000 in the program. Select TCP/IP and click Properties to edit its port
Select TCP/IP to modify its properties
Set the default port to 1433