Network-related or instance-specific errors occur when you establish a connection with SQL Server.

Source: Internet
Author: User
Tags microsoft sql server 2005 mssqlserver

Network-related or instance-specific errors occur when you establish a connection with SQL Server.

Just like before, I learned the video of the Niuke news publishing system, typed the code, opened the database, and displayed a frame. The details are as follows:

The database cannot be connected, and all the work should be closed. After a while, let's briefly summarize the solutions to this problem.

First: Step 1: program -- SQL Server2008 -- Configuration tool -- SQL Server Configuration Manager, find the MSSQLSERVER protocol in the SQL Server network configuration:

Step 2: Right-click and enable all stopped services.

Step 3: After the startup is complete, as shown below:

Connect the database as follows:

There are two reasons for the problem. First, the database engine is not started. Second, whether remote connection is allowed. The database engine has not been started. There are two ways to start. The first method has ended before. Let's take a look at the second method: open: start-> Program-> Microsoft SQL Server 2005-> Configuration tool-> SQL Server Configuration Manager, select the SQL Server 2005 service
SQL Server (MSSQLSERVER), and click "Start Service" in the toolbar to change the service status to start. (SQL server 2008 uses this method, start-> Program-> Microsoft SQL Server 2008 R2-> Configuration tool-> SQL Server Configuration Manager, disable VIA In MSSQLSERVER protocol, select SQL Server (MSSQLSERVER) in the SQL Server service and click "Start Service" in the toolbar to change the service status to start, sometimes an error may occur during startup and cannot be started. In this case, check whether the SQL Server 2005 network configuration in "SQL Server 2005 Configuration Manager"> whether the VIA in MSSQLSERVER protocol is enabled, if enabled, disable it. then, execute the preceding operation.

Another cause of the problem is whether remote connection is allowed. This part can be simply divided into four aspects, enable remote connection on SQL Server, enable SQL Server browsing service, create exceptions for SQL Server 2005 in Windows Firewall, and create exceptions for "SQLBrowser" in Windows Firewall. The following is a detailed explanation of the four situations:

First, enable remote connection on the SQLServer instance 

1. Point to "start-> Program-> Microsoft SQL Server 2005-> Configuration tool-> SQL Server peripheral application configurator"
2. on the "SQL Server 2005 peripheral application configurator" page, click "service and connected peripheral application configurator"
3. click expand database engine, select remote connection, select local connection and remote connection on the right, and then select the Protocol to use, (TCP/IP and named pipe service should be enabled here !) Click "application" and you will see the following message: "the changes made to the connection settings will not take effect until the Database Engine service is restarted .", Click OK to return
4. Expand "Database Engine", select "service", click "stop" on the right side, wait until the MSSQLSERVER service is stopped, and then click "start" to restart the MSSQLSERVER service.


2. Enable the SQLServer Browser Service
1. Point to "start-> Program-> Microsoft SQL Server 2005-> Configuration tool-> SQL Server peripheral application configurator"
2. on the "SQL Server 2005 peripheral application configurator" page, click "service and connected peripheral application configurator"
3. Click expand "SQL Server Browser", select "service", select "automatic" for "Start type" on the right, click "start", and click "OK" to return.


Third:Create an exception for "SQL Server 2005" in Windows Firewall
1. on the Windows Firewall settings page, select the "exceptions" tab and click "add program"
2. In the add program window, click browse"
3. find "C: \ ProgramFiles \ Microsoft Files \ Microsoft SQL Server \ MSSQL.1 \ MSSQL \ Binn \ sqlservr.exe" and click "OK: the path may vary depending on SQL Server 2005 installation. MSSQL.1 is a placeholder that corresponds to the database instance ID.
4. Repeat steps 1 to 3 for each SQL Server 2005 instance that requires remote access.


Fourth:Create an exception for "SQLBrowser" in Windows Firewall 
1. on the Windows Firewall settings page, select the "exceptions" tab and click "add program"
2. In the add program window, click browse"
3. find "C: \ ProgramFiles \ Microsoft Files \ Microsoft SQL Server \ 90 \ Shared \ sqlbrowser.exe", and click "OK". Note: the path may vary depending on SQL Server 2005 installation.
In use. NET development, you will encounter the problem of using the connection string to connect to the SQL Server 2005 database using the machine name and localhost can be connected, but the use of IP addresses can not be connected, the solution is to enable local and remote connections on the SQL Server instance, and use the TCP/IP and named pipeline services when selecting the protocol.

After the database is connected, the database can be used normally. Then, when a problem occurs in the niujiao news publishing system, it must be solved in a timely manner. Otherwise, the database will be delayed and the target will become red and red, niuyun news publishing system, not complete, to be continued ......


A network-related or instance-specific error occurred when establishing a connection with SQL Server. The instance name cannot be accessed or accessed.

[Solution]
1. Network-related or instance-specific errors occur when you establish a connection with SQLServer. The server is not found or cannot be accessed. Verify the Instance name ...... Solution:
Wenku.baidu.com/...5.html
2. Solutions for database connection failures:
Wenku.baidu.com/...9.html
Wish you all the best and good luck!

"/" Server errors in the application cause network-related or instance-specific errors when establishing a connection with SQL Server

Generally, perform the following steps:
1. Check whether the database allows remote connection.
2. Check whether the Database Service is properly started.
3. confirm that the database server firewall is enabled
4. confirm that the network from the client to the server is smooth
5. confirm that the connection string is correct, including: Host Name \ Instance name, Port
6. Check whether the database allows mixed logon.
 

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.