Resolve SQL Server does not allow remote connectivity issues

Just install the database system, in accordance with the default installation, it is likely an error during a remote connection, usually a mistake: "In connection to SQL Server 2005, the default settings SQL Server does not allow remote connection may cause this failure .

  Just install the database system, in accordance with the default installation, it is likely an error during a remote connection, usually a mistake: "In connection to SQL Server 2005, the default settings SQL Server does not allow remote connection may cause this failure . (provider: named pipes provider, error: 40 - Could not open a connection to SQL Server), "for this problem now summarized as follows:

  Understand SQL Server is a network database can be solved, simply divided into following several situations.

  ◆ 1. Database engine does not start. There are two ways to start:

  (1) Start -> Programs -> Microsoft SQL Server 2005-> SQL Server 2005 Surface Area Configuration, "Service Area Configuration connection" to find Database Engine in the open interface that opens click interface, single click the "service" to see the right side has started, if not start click the "start" and make sure the "startup type" to automatic, not manual, otherwise have to manually start the next boot;

  (2) open: Start -> Programs -> Microsoft SQL Server 2005-> Configuration Tools -> SQL Server Configuration Manager, select the SQL Server 2005 services in SQL Server (MSSQLSERVER), and click the "Start Service" toolbar button to start the service status change;

  When the above two ways, sometimes errors can occur at boot time, you can not start, then we should see the SQL Server 2005 Network Configuration "SQL Server 2005 Configuration Manager" in the -> MSSQLSERVER agreement VIA has been enabled, if enabled, put it banned. then perform the above-mentioned one way operation on it.

  ◆ 2. Whether to allow remote connections. This part can be simply divided into four areas, namely to enable remote connections on SQL Server, enable SQL Server Browser service in Windows Firewall to create an exception in SQL Server 2005 and in Windows Firewall to create an exception for the "SQLBrowser" is. Here are some specific mode of operation:

  Enable remote connections on the instance of SQLServer

  . ◆ 1 point to "Start -> Programs -> Microsoft SQL Server 2005-> Configuration Tools -> SQL Server Surface Area Configuration"

  ◆ 2. In the "SQL Server 2005 Surface Area Configuration" page, click the "Surface Area Configuration service and connections"

  ◆ 3. Then click to expand the "Database Engine", select "remote connection" in the right select "local connections and remote connections"

  Then select the protocol to use, (! This place should enable TCP / IP and Named Pipes Services) Click "Apply", you will see the next message:

  "After the service until you restart the Database Engine, the connection settings take effect the changes will be.", Click "OK" button to return

  ◆ 4. Expand the "Database Engine", select the "service" in the right click "Stop", wait until the MSSQLSERVER service stops,

  Then click "Start" to restart the MSSQLSERVER service.

  Enabling SQLServer Browser service

  . ◆ 1 point to "Start -> Programs -> Microsoft SQL Server 2005-> Configuration Tools -> SQL Server Surface Area Configuration"

  ◆ 2. In the "SQL Server 2005 Surface Area Configuration" page, click the "Surface Area Configuration service and connections"

  ◆ 3. Then click to expand "SQL Server Browser", select the "service" in the right "Startup type" select "Auto"

  Then click "Start," click "OK" button to return

  In the Windows Firewall for "SQL Server 2005" to create an exception

  ◆ 1. In the Windows Firewall settings interface, select the "Exceptions" tab, then click the "Add Program"

  ◆ 2. In the "Add a Program window" click "Browse"

  . ◆ 3 and then find the "C: \ ProgramFiles \ Microsoft Files \ Microsoft SQL Server \ MSSQL.1 \ MSSQL \ Binn \ sqlservr.exe",

  Click "OK" to return

  Note: The path may be based on SQL Server 2005 installation differs. MSSQL.1 is a placeholder for the corresponding database instance ID.

  ◆ 4. 2005 for each instance, repeat steps need to open the remote access SQL Server 1 to 3.

  In the Windows Firewall to create an exception for the "SQLBrowser"

  ◆ 1. In the Windows Firewall settings interface, select the "Exceptions" tab, then click the "Add Program"

  ◆ 2. In the "Add a Program window" click "Browse"

  . ◆ 3 and then find the "C: \ ProgramFiles \ Microsoft Files \ Microsoft SQL Server \ 90 \ Shared \ sqlbrowser.exe",

  Click "OK" to return

  Note: The path may be based on SQL Server 2005 installation differs. When using the .NET development carried out, it will encounter connection string to connect SQL Server 2005 database using the machine name and localhost can connect, but the use of IP addresses can not connect, the solution is enabled on the local SQL Server instance and remote connections, and uses TCP / IP and named pipes protocol services can be solved in time.

Reproduced in: https: //www.cnblogs.com/henryhappier/archive/2010/03/29/1700118.html

Guess you like

Origin blog.csdn.net/weixin_33777877/article/details/93537515