An error occurred while establishing a connection to the server. When you connect to SQL Server 2005, SQL Server does not allow remote connections under the default settings

Source: Internet
Author: User
Tags configuration settings microsoft sql server microsoft sql server 2005 mssql mssqlserver

An error occurred while establishing a connection to the server. When you connect to SQL Server 2005, SQL Server does not allow remote connections under the default settings

SQL Server server SQL Servers remote Connection database firewall
An error occurred while establishing a connection to the server. When you connect to SQL Server 2005, SQL Server does not allow remote connections under the default settings

An error occurred while establishing a connection to the server. When you connect to SQL Server 2005, SQL Server does not allow remote connections under the default settings, which can cause this failure. (provider: Named pipe provider, ERROR:40-Unable to open connection to SQL Server)


Why. I've set his remote connection to TC/IP and Nanme in the peripheral configuration settings of SQL.
And I've tried it on the internet, and I'm in the VS2005, but the rice is loaded. SQL SERVER
Problem solved there are extra points!



Reply:

SQL Server 2005 does not allow remote connection resolution

Many students are confronted with this problem when doing the curriculum design. Write the solution here for your reference.

The database system that was just installed, as per the default installation, is likely to be wrong with the remote connection times, usually error: "When you connect to SQL Server 2005, SQL Server does not allow remote connections under the default settings, which can cause this failure. (provider: Named pipe provider, ERROR:40-Unable to open connection to SQL Server) "Search MSDN, there is a machine translation of the article, is difficult to understand, now summarized as follows: Understand that SQL Server is a network database can be solved, simply divided into the following concentration situation.

1. The database engine is not started.

There are two ways to start:

(1) Start-up Program->microsoft SQL Server 2005->sql Server 2005 surface Area Configuration, in the Open interface, click the connected surface Area configuration of the service, locate the database in the Open interface Engine, click on "Services", on the right side to see if it is started, if not started, click "Start" and make sure "Startup Type" is automatic, do not manually, or the next time you start the boot manually;

(2) Open: Start-up program->microsoft SQL Server 2005-> Configuration tool->sql Server config Manager, selecting SQL Se in SQL Server 2005 Services RVer (MSSQLSERVER), and click the "Start Service" button in the toolbar to change the service status to start;

When using either of these methods, sometimes errors may occur at startup and cannot be started, so you should see if via is enabled in SQL Server 2005 Network Configuration->mssqlserver protocol in SQL Server 2005 Configuration Manager. If it is enabled, disable it. Then perform one of the above actions.

2. Whether remote connections are already allowed.

This section can be easily divided into 4 areas, namely, enabling remote connections on SQL Server, enabling the SQL Server browsing service, creating exceptions for SQL Server 2005 in Windows Firewall, and "SQLBrowser" in Windows Firewall Exceptions. Here are a few specific ways to do this, from MSDN, where individuals feel that the bold part of the article should be special to our attention.


To enable remote connections on a SQL Server instance
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 Database Engine, select Remote connection, and on the right, select Local Area Connection and remote connection.
Then select the protocol you want to use (this place should enable the TCP/IP and Named Pipes service!). Click "Apply" and you will see the following message:
"Changes made to the connection settings will not take effect until the Database engine service is restarted. , click the OK button to return
4. Expand Database Engine, select Services, click Stop on the right, and wait until the MSSQLSERVER service stops.
Then click Start to restart the MSSQLServer service.

Enable the 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, and on the right "startup type" select "Automatic",
Click Start, and then click OK to return

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 find "C:/programfiles/microsoft files/microsoft SQL server/mssql.1/mssql/binn/

An error occurred while establishing a connection to the server. When you connect to SQL Server 2005, SQL Server does not allow remote connections under the default settings

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.