SQL Server Request failure Solution

Source: Internet
Author: User
Tags microsoft sql server 2005

SQL2005 failed to start SQL Server Request or service failed to respond in time

Disable the VIA protocol to solve the problem. "VIA protocol" Deactivation method: start-> Program-> Microsoft SQL Server 2005-> Configuration tool-> SQL Server Configuration Manager-> open and find "SQL Server 2005 network Configuration"-> protocol of MSSQLSERVER attribute on the right in the properties box, disable the "VIA protocol!

Why does the request fail or the service does not respond in time when the SQL server Configuration Manager is started?

Solution:

Disable the VIA protocol to solve the problem. "VIA protocol" Deactivation method: start-> Program-> Microsoft SQL Server 2005-> Configuration tool-> SQL Server Configuration Manager-> open and find "SQL Server 2005 network Configuration"-> protocol of MSSQLSERVER attribute on the right in the properties box, disable the "VIA protocol!

You can check its log to see if such a similar sentence exists in the middle,

The file "C: Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDATAmastlog. ldf" has been compressed, but does not reside in a read-only database or file group. The file must be decompressed.

If yes, right-click the SQL folder and select "advanced". On the displayed page, click the "compress content to save disk space" option. OK.

Solve the problem that SQL Server does not allow remote connection.

For the database system that has just been installed, if it is installed by default, it is likely that an error is reported during remote connection. The common error is: "When you connect to SQL Server 2005, this failure may occur if SQL Server does not allow remote connection by default. (Provider: named pipeline provider, error: 40-unable to open the connection to SQL Server) ", the problem is summarized as follows:

I understand that SQL Server is a network database and can be easily solved. It is simply divided into the following situations.

◆ 1. The database engine is not started. There are two startup methods:

(1) Start-> Program-> Microsoft SQL Server 2005-> SQL Server 2005 peripheral application configurator. On the displayed page, click "peripheral application configurator for service connection ", on the displayed page, find the Database Engine and click "service". Check whether the service is started on the right side. If not, click "start" and make sure "Start type" is automatic, do not manually start the instance. Otherwise, the instance must be manually started the next time it is started;

(2) You can choose Start> program> Microsoft SQL Server 2005> Configuration tool> SQL Server Configuration Manager, and select SQL Server (MSSQLSERVER) in SQL Server 2005 ), click "Start Service" in the toolbar to change the service status to start;

When using the above two methods, sometimes an error may occur during startup, and cannot be started, in this case, check whether the VIA in SQL Server 2005 network configuration> MSSQLSERVER protocol is enabled in "SQL Server 2005 Configuration Manager". If yes, disable it. then, execute the preceding operation.

◆ 2. 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 are some specific operations:

Enable remote connection on an 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", and select "local connection and remote connection" on the right ",

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, and wait until the MSSQLSERVER service is stopped,

Click Start to restart the MSSQLSERVER service.

Enable 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 to expand "SQL Server Browser", select "service", and select "automatic" in "Startup Type" on the right ",

Click Start and then click OK to return

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. Then find "C: ProgramFilesMicrosoft FilesMicrosoft SQL Server MSSQL.1 MSSQLBinnsqlservr.exe ",

Click OK to return

Note: 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.

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. Then find "C: ProgramFilesMicrosoft FilesMicrosoft SQL Server90Sharedsqlbrowser.exe ",

Click OK to return

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.

An error message may be received when you try to connect to a Microsoft SQL Server 2005 instance from a remote computer. This problem may occur when any program is used to connect to SQL Server. For example, when you connect to SQL Server using the SQLCMD utility, you receive the following error message:

Sqlcmd: Error: Microsoft SQL Native Client: An error occurred while establishing a connection to the server. When you connect to SQL Server 2005, the fact that SQL Server does not allow remote connection by default may cause failure.

This problem may occur if SQL Server 2005 is not configured to accept remote connections. By default, SQL Server 2005 Express Edition and SQL Server 2005 Developer Edition do not allow remote connection. To configure SQL Server 2005 to allow remote connection, complete these steps:

· Enable remote connection on the SQL Server instance to which you want to connect from a remote computer.

· Open the SQL Server Browser Service.

· Configure a firewall to allow network communication related to the SQL Server and SQL Server Browser services.

This document describes how to complete each step of these steps.

To enable remote connection on an SQL Server 2005 instance and enable the SQL Server Browser Service, use the SQL Server 2005 peripheral application configurator tool. When SQL Server 2005 is installed, the peripheral application configurator tool is installed. Enable remote connection for SQL Server 2005 Express Edition or SQL Server 2005 Developer Edition

You must enable remote connection for each SQL Server 2005 instance that you want to connect to from a remote computer. To do this, follow these steps:

1. Click Start, point to programs, Microsoft SQL Server 2005, and configuration tools, and then click SQL Server peripheral application configurator ".

2. on the "SQL Server 2005 peripheral application configurator" page, click "service and connected peripheral application configurator ".

3. on the "service and connected peripheral application configurator" Page, expand "Database Engine", and then click "remote connection" and "local connection and remote connection ", click the protocol that applies to your environment, and then click "application ".

Note: When you receive the following message, click "OK ":

The changes made to the connection settings will not take effect until the Database Engine service is restarted.

4. on the "service and connected peripheral application configurator" Page, expand "Database Engine", click "service" and "stop", and wait until the MSSQLSERVER service is stopped, click Start to restart the MSSQLSERVER service.

Enable the SQL Server Browser Service

If you run SQL Server 2005 by using the Instance name and do not use a specific TCP/IP Port number in the connection string, you must enable the SQL Server Browser service to allow remote connection. For example, use the default Instance name of <computer name> SQLEXPRESS to Install SQL Server 2005 Express. No matter how many SQL Server 2005 instances are running, you only need to enable the SQL Server Browser service once. To enable the SQL Server Browser Service, follow these steps.

When you connect to SQL Server 2005, the default setting does not allow remote connection to SQL Server may cause this failure. (Provider: named pipeline provider, error: 40-unable to open the connection to SQL Server)

SQL Server 2005 does not allow remote connection Solution

During the course design, many students encountered this problem. Write the solution here for your reference.

For the database system that has just been installed, if it is installed by default, it is likely that an error is reported during remote connection, which is usually an error: "When connecting to SQL Server 2005, this failure may occur if SQL Server does not allow remote connection by default. (Provider: named pipeline provider, error: 40-unable to open the connection to SQL Server) "Search MSDN, The Machine Translation article above is hard to understand, the following is a summary: I understand that SQL Server is a network database and can be easily solved. It is simply divided into the following concentrated situations.

1. The database engine is not started.

There are two startup methods:

(1) Start-> Program-> Microsoft SQL Server 2005-> SQL Server 2005 peripheral application configurator, click "peripheral application configurator of service connection" on the open interface, find the Database Engine in the open interface, click "service", and check whether it is started on the right side. If it is not started, click "start" and make sure "Start type" is automatic, do not manually start the instance. Otherwise, the instance must be manually started the next time it is started;

(2) You can choose Start> program> Microsoft SQL Server 2005> Configuration tool> SQL Server Configuration Manager, and select SQL Server (MSSQLSERVER) in SQL Server 2005 ), click "Start Service" in the toolbar to change the service status to start;

When using the above two methods, sometimes an error may occur during startup, and cannot be started, in this case, check whether the VIA in SQL Server 2005 network configuration> MSSQLSERVER protocol is enabled in "SQL Server 2005 Configuration Manager". If yes, disable it. then, execute the preceding operation.

2. 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 are some specific operations. From MSDN, I personally think that the simhei part of the article should be paid special attention to together.

Enable remote connection on an 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, and select local connection and remote connection on the right ",

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, and wait until the MSSQLSERVER service is stopped,

Click Start to restart the MSSQLSERVER service.

Enable 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", and select "automatic" in "Startup Type" on the right ",

Click Start and then click OK to return

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. Then find "C: ProgramFilesMicrosoft FilesMicrosoft SQL Server MSSQL.1 MSSQLBinn

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.