Network-related or instance-specific errors when establishing a connection to SQL Server

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

Yearning before, learning beef Brisket news Release system video, knock code, open the database, a box appears, the details are as follows:

Database connection is not on, all the work to day off, tinkering for a while, briefly summarize the solution to the problem.

First: The first step, the program--sql server2008--Configuration Tool--sql Server Configuration Manager, locate the MSSQLSERVER protocol in the SQL Server network configuration:

Step two: Turn on all services that have been stopped, right-click Enable.

Step three: After the boot is complete, as shown below

Connect the database as follows:

Summarize the cause of the problem is two, first, the database engine does not start, second, whether the remote connection has been allowed. The database engine does not start, there are two ways to start, the first way to start before the end of the article, we look at the second way to start: Open: Start-up program->microsoft SQL Server 2005-> Configuration tool->sql Server Configuration Manager, select the SQL Server 2005 service
SQL Server (MSSQLSERVER), and click the "Start Service" button in the toolbar to change the service status to start, (SQL Server 2008 uses this method, start-and program->microsoft SQL Server r2- > Configuration Tool->sql Server Counterweight Manager, disable via in the MSSQLSERVER protocol, select SQL Server Service (MSSQLSERVER) in SQL Server services, and click Start Service in the toolbar button to change the service status to start) when using the above two methods, sometimes in the start of the error may occur, cannot start, this time to see the SQL Server 2005 Configuration Manager in the SQL Server 2005 Network configuration, If the Via in the MSSQLServer protocol is enabled, disable it if it is enabled. Then do one of the above operations.

Another reason for the problem is whether to allow remote connections, which can be easily divided into 4 areas, namely enabling remote connections on SQL Server, enabling the SQL Server Browsing service, and SQL Server 2005 in Windows Firewall Create exceptions and create exceptions for "SQLBrowser" in Windows Firewall. These four scenarios are explained in more detail below:

First: Enable remote connections on an instance of SQL Server

       1. Point to start with program->microsoft SQL Server 2005-> Configuration Tool- >sql Server surface Area Configuration  
       2. On the SQL Server 2005 Surface Area Configuration page, click the surface area Configuration for services and connections  
& nbsp      3. Then click to expand Database engine, check remote connections, select Local Area Connection and remote connections on the right, and select the protocol to use (this place should enable the TCP/IP and Named Pipes service!). Click Apply, and you'll see the following message:   "Changes to the connection settings will not take effect until the Database engine service is restarted. , click the OK button to return to  
       4. Expand Database Engine, select Services, click Stop on the right, wait until the MSSQLSERVER service stops,   and then click Start, Restart the MSSQLServer service.


Second type: Enable SQL Server Browser service
1. Point to Start Program->microsoft SQL Server 2005-> Configuration tool->sql Server surface Area Configuration
2. On the SQL Server 2005 Surface Area Configuration page, click the surface area Configuration for services and connections
3. Then click to expand SQL Server Browser, select Services, select Automatic on the right startup type, click Start, and click OK to return.


The third type: Create an exception for SQL Server 2005 in Windows Firewall
1. In the Windows Firewall Settings screen, select the Exceptions tab, and then click Add Program
2. In the Add Program window, click Browse
3. Then locate "C:\ProgramFiles\Microsoft Files\Microsoft SQL Server\ MSSQL.1 \mssql\binn\sqlservr.exe" and click "OK" to return note: The path may be based on the SQ L Server 2005 installation is different. MSSQL.1 is a placeholder that corresponds to the database instance ID.
4. Repeat steps 1 through 3 for each instance of SQL Server 2005 that needs to open remote access.


The Fourth type: Create an exception for "SQLBrowser" in Windows Firewall
1. In the Windows Firewall Settings screen, select the Exceptions tab, and then click Add Program
2. In the Add Program window, click Browse
3. Then locate "C:\ProgramFiles\Microsoft Files\Microsoft SQL Server\90\shared\sqlbrowser.exe" and click "OK" to return note: The path may be based on the SQL Server 2005 installation is different and different.
In use. NET development, you will encounter the problem of using the connection string to connect a SQL Server 2005 database with a machine name and localhost, but with an IP address that cannot connect, the solution is to enable local and remote connections on the SQL Server instance. And the use of TCP/IP and the named pipe service when choosing a protocol can be resolved.

Database connection good, can normal use, then knock Beef Brisket Press release system, there are problems, need to be resolved in a timely manner, otherwise, is a drag and drag, this goal red and red, beef brisket press release system, not finished, to be continued ...

Network-related or instance-specific errors when establishing a connection to SQL Server

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.