how to configure sql server 2005 to allow remote connections
TRANSCRIPT
-
7/31/2019 How to Configure SQL Server 2005 to Allow Remote Connections
1/6
How to configure SQL Server 2005 to allow remote connections
http://support.microsoft.com/kb/914277 (1 of 6) [2/6/2012 5:58:49 PM]
Support Home
Solution Centers
Advanced Search
Buy Products
United States
Other ResourcesArticle ID: 914277 - Last Review: September 17, 2011 - Revision: 3.0
How t o configure SQL Server 2005 t o allow rem ote connectionsOther Support Sites
Community
Get Help Now
Get System Center Advisor
Article Translations
View products that this article applies to.
When you try to connect to an instance of Microsoft SQL Server 2005 from a remote computer, you may receive an error
message. This problem may occur when you use any program to connect to SQL Server. For example, you receive the following
error message when you use the SQLCMD utility to connect to SQL Server:
This problem may occur when 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 connections. To configure SQL Server 2005 to allow
remote connections, complete all the following steps:
This article describes how to complete each of these steps.
( (
Expand all | Collapse all
( (
Brasil (Portugus)
esk republika (etina)
Deutschland (Deutsch)
Espaa, Latinoamrica (Espaol)
France (Franais)
Italia (Italiano)
Nederland (Nederlands)
Portugal (Portugus) Slovensk Republika (Slovenina)
Trkiye (Trke)
()
On This Page
INTRODUCTION
Enable remote connections on the instance of SQL Server that you want to connect to from a remote computer.
Turn on the SQL Server Browser service.
Configure the firewall to allow network traffic that is related to SQL Server and to the SQL Server Browser service.
Back to the top
Sqlcmd: Error: Microsoft SQL Native Client: An error has occurred while establishing a connection to the server. When
connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not
allow remote connections.
Related Support Centers
SQL Server 2005
SQL Server
Search Microsoft Support
http://support.microsoft.com/http://support.microsoft.com/select/?target=hubhttp://support.microsoft.com/search/?adv=1http://www.microsoftstore.com/store/msstore/home?WT.mc_id=SMCBAR_ENUS_ADR_BUYALLhttp://support.microsoft.com/default.aspx/kb/914277?hdrFo=mthdr07http://www.systemcenteradvisor.com/http://support.microsoft.com/kb/914277/arhttp://support.microsoft.com/kb/914277/pt-brhttp://support.microsoft.com/kb/914277/cshttp://support.microsoft.com/kb/914277/cshttp://support.microsoft.com/kb/914277/cshttp://support.microsoft.com/kb/914277/cshttp://support.microsoft.com/kb/914277/cshttp://support.microsoft.com/kb/914277/cshttp://support.microsoft.com/ph/2855http://support.microsoft.com/kb/914277/dehttp://support.microsoft.com/ph/1044http://support.microsoft.com/kb/914277/eshttp://support.microsoft.com/kb/914277/frhttp://support.microsoft.com/kb/914277/ithttp://support.microsoft.com/kb/914277/nlhttp://support.microsoft.com/kb/914277/pthttp://support.microsoft.com/kb/914277/skhttp://support.microsoft.com/kb/914277/skhttp://support.microsoft.com/kb/914277/skhttp://support.microsoft.com/kb/914277/trhttp://support.microsoft.com/kb/914277/elhttp://support.microsoft.com/kb/914277/elhttp://support.microsoft.com/kb/914277/elhttp://support.microsoft.com/kb/914277/elhttp://support.microsoft.com/ph/2855http://support.microsoft.com/ph/1044http://support.microsoft.com/ph/1044http://support.microsoft.com/ph/2855http://support.microsoft.com/kb/914277/elhttp://support.microsoft.com/kb/914277/trhttp://support.microsoft.com/kb/914277/skhttp://support.microsoft.com/kb/914277/pthttp://support.microsoft.com/kb/914277/nlhttp://support.microsoft.com/kb/914277/ithttp://support.microsoft.com/kb/914277/frhttp://support.microsoft.com/kb/914277/eshttp://support.microsoft.com/kb/914277/dehttp://support.microsoft.com/kb/914277/cshttp://support.microsoft.com/kb/914277/pt-brhttp://support.microsoft.com/kb/914277/arhttp://www.systemcenteradvisor.com/http://www.systemcenteradvisor.com/http://support.microsoft.com/default.aspx/kb/914277?hdrFo=mthdr07http://www.microsoftstore.com/store/msstore/home?WT.mc_id=SMCBAR_ENUS_ADR_BUYALLhttp://support.microsoft.com/search/?adv=1http://support.microsoft.com/select/?target=hubhttp://support.microsoft.com/ -
7/31/2019 How to Configure SQL Server 2005 to Allow Remote Connections
2/6
How to configure SQL Server 2005 to allow remote connections
http://support.microsoft.com/kb/914277 (2 of 6) [2/6/2012 5:58:49 PM]
To enable remote connections on the instance of SQL Server 2005 and to turn on the SQL Server Browser service, use the SQL
Server 2005 Surface Area Configuration tool. The Surface Area Configuration tool is installed when you install SQL Server 2005.
You must enable remote connections for each instance of SQL Server 2005 that you want to connect to from a remote computer.
To do this, follow these steps:
If you are running SQL Server 2005 by using an instance name and you are not using a specific TCP/IP port number in your
connection string, you must enable the SQL Server Browser service to allow for remote connections. For example, SQL Server
2005 Express is installed with a default instance name ofComputer Name\SQLEXPRESS. You are only required to enable the
SQL Server Browser service one time, regardless of how many instances of SQL Server 2005 you are running. To enable the
SQL Server Browser service, follow these steps.
Impor tant These steps may increase your security risk. These steps may also make your computer or your network more
vulnerable to attack by malicious users or by malicious software such as viruses. We recommend the process that this article
describes to enable programs to operate as they are designed to, or to implement specific program capabilities. Before you make
these changes, we recommend that you evaluate the risks that are associated with implementing this process in your particular
environment. If you choose to implement this process, take any appropriate additional steps to help protect your system. We
Enable remote connect ions for SQL Server 20 05 Express or SQL Server 20 05 Developer Edition
Enable the SQL Server Brow ser service
()
()
()
()
()
()
()
MORE INFORMATION
Back to the top
1. Click Start , point to Programs, point to Microsof t SQL Server 2005 , point to Conf igurat ion Tools , and then
click SQL Server Surface Area Conf igurat ion .
2. On the SQL Server 2005 Surface Area Conf igurat ion page, click Surface Area Conf igurat ion for
Services and Connect ions .
3. On the Surface Area Conf igurat ion for Services and Connect ions page, expand Database Engine , click
Remote Connect ions , click Loca l and remote connec t ions , click the appropriate protocol to enable for your
environment, and then click Apply .
Note Click OK when you receive the following message:
Changes to Connection Settings will not take effect until you restart the Database Engine service.
4. On the Surface Area Conf igurat ion for Services and Connect ions page, expand Database Engine , click
Service , click Stop , wait until the MSSQLSERVER service stops, and then click Start to restart the MSSQLSERVER
service.
Back to the top
http://support.microsoft.com/kb/914277/ruhttp://support.microsoft.com/kb/914277/ruhttp://support.microsoft.com/kb/914277/ruhttp://support.microsoft.com/kb/914277/ruhttp://support.microsoft.com/kb/914277/hihttp://support.microsoft.com/kb/914277/hihttp://support.microsoft.com/kb/914277/hihttp://support.microsoft.com/kb/914277/hihttp://support.microsoft.com/kb/914277/thhttp://support.microsoft.com/kb/914277/thhttp://support.microsoft.com/kb/914277/thhttp://support.microsoft.com/kb/914277/thhttp://support.microsoft.com/kb/914277/kohttp://support.microsoft.com/kb/914277/kohttp://support.microsoft.com/kb/914277/kohttp://support.microsoft.com/kb/914277/kohttp://support.microsoft.com/kb/914277/zh-cnhttp://support.microsoft.com/kb/914277/zh-cnhttp://support.microsoft.com/kb/914277/zh-cnhttp://support.microsoft.com/kb/914277/zh-cnhttp://support.microsoft.com/kb/914277/zh-twhttp://support.microsoft.com/kb/914277/zh-twhttp://support.microsoft.com/kb/914277/zh-twhttp://support.microsoft.com/kb/914277/zh-twhttp://support.microsoft.com/kb/914277/jahttp://support.microsoft.com/kb/914277/jahttp://support.microsoft.com/kb/914277/jahttp://support.microsoft.com/kb/914277/jahttp://support.microsoft.com/kb/914277/jahttp://support.microsoft.com/kb/914277/zh-twhttp://support.microsoft.com/kb/914277/zh-cnhttp://support.microsoft.com/kb/914277/kohttp://support.microsoft.com/kb/914277/thhttp://support.microsoft.com/kb/914277/hihttp://support.microsoft.com/kb/914277/ru -
7/31/2019 How to Configure SQL Server 2005 to Allow Remote Connections
3/6
How to configure SQL Server 2005 to allow remote connections
http://support.microsoft.com/kb/914277 (3 of 6) [2/6/2012 5:58:49 PM]
recommend that you use this process only if you really require this process.
These steps apply to the version of Windows Firewall that is included in Windows XP Service Pack 2 (SP2) and in Windows
Server 2003. If you are using a different firewall system, see your firewall documentation for more information.
If you are running a firewall on the computer that is running SQL Server 2005, external connections to SQL Server 2005 will be
blocked unless SQL Server 2005 and the SQL Server Browser service can communicate through the firewall. You must create an
exception for each instance of SQL Server 2005 that you want to accept remote connections and an exception for the SQL Server
Browser service.
SQL Server 2005 uses an instance ID as part of the path when you install its program files. To create an exception for each
instance of SQL Server, you must identify the correct instance ID. To obtain an instance ID, follow these steps:
Note When you run the SQL Server Browser service on a computer, the computer displays the instance names and the
connection information for each instance of SQL Server that is running on the computer. This risk can be reduced by not enabling
the SQL Server Browser service and by connecting to the instance of SQL Server directly through an assigned TCP port.
Connecting directly to an instance of SQL Server through a TCP port is beyond the scope of this article. For more information
about the SQL Server Browser server and connecting to an instance of SQL Server, see the following topics in SQL Server Books
Online:
Create exceptions in Windows Firewall
1. Click Start , point to Programs, point to Microsof t SQL Server 2005 , point to Conf igurat ion Tools , and then
click SQL Server Surface Area Conf igurat ion .
2. On the SQL Server 2005 Surface Area Conf igurat ion page, click Surface Area Conf igurat ion for
Services and Connect ions .
3. On the Surface Area Conf igurat ion for Services and Connect ions page, click SQL Server Browser , click
Automat ic forStartup type , and then click Apply .
Note When you click the Automat ic option, the SQL Server Browser service starts automatically every time that you
start Microsoft Windows.
4. Click Start , and then click OK .
SQL Server Browser Service
Connecting to the SQL Server Database Engine
Client Network Configuration
Back to the top
-
7/31/2019 How to Configure SQL Server 2005 to Allow Remote Connections
4/6
How to configure SQL Server 2005 to allow remote connections
http://support.microsoft.com/kb/914277 (4 of 6) [2/6/2012 5:58:49 PM]
To open Windows Firewall, click Start , click Ru n , type f i rewal l . cp l, and then click OK .
To create an exception for SQL Server 2005 in Windows Firewall, follow these steps:
To create an exception for the SQL Server Browser service in Windows Firewall, follow these steps:
Create an exception for SQL Server 2005 in Windows Firewall
Create an exception for the SQL Server Browser service in Windows Firewall
Back to the top
1. Click Start , point to Programs, point to Microsof t SQL Server 2005 , point to Conf igurat ion Tools , and then
click SQL Server Conf igurat ion Manager .
2. In SQL Server Configuration Manager, click the SQL Server Browser service in the right pane, right-click the instance
name in the main window, and then click Propert ies .
3. On the SQL Server Brow ser Propert ies page, click the Advanced tab, locate the instance ID in the property list,
and then click OK .
1. In Windows Firewall, click the Except ions tab, and then click Add Program .
2. In the Add a Program window, click Browse.
3. Click the C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Binn\sqlservr.exe executable program, click Open ,
and then click OK .
Note The path may be different depending on where SQL Server 2005 is installed. MSSQL.1 is a placeholder for the
instance ID that you obtained in step 3 of the previous procedure.
4. Repeat steps 1 through 3 for each instance of SQL Server 2005 that needs an exception.
1. In Windows Firewall, click the Except ions tab, and then click Add Program .
2. In the Add a Program window, click Browse.
3. Click the C:\Program Files\Microsoft SQL Server\90\Shared\sqlbrowser.exe executable program, click Open , and then
click OK .
Note The path may be different depending on where SQL Server 2005 is installed.
Back to the top
APPLIES TO
kbsqlsetup kbhowto kbtshoot kbinfo KB914277Keywords:
-
7/31/2019 How to Configure SQL Server 2005 to Allow Remote Connections
5/6
How to configure SQL Server 2005 to allow remote connections
http://support.microsoft.com/kb/914277 (5 of 6) [2/6/2012 5:58:49 PM]
Back to the top
Was this informat ion helpful?
How muc h ef for t did you personal ly put for th to use this ar t ic le?
Te l l us why and what can we do t o i mprove t h i s i n f o rmat i on
Yes
No
Somewhat
Very low
Low
Moderate
High
Very high
-
7/31/2019 How to Configure SQL Server 2005 to Allow Remote Connections
6/6
How to configure SQL Server 2005 to allow remote connections
http://support.microsoft.com/kb/914277 (6 of 6) [2/6/2012 5:58:49 PM]
2012 Microsoft
Feedback
Services Agreement
Manage Profiles
Contact Us
Terms of Use
Trademarks
Privacy Statement
Get Help Now
Contact a support professional by E-mail, Online, or Phone
Submit
http://window.open%28%27http//support.microsoft.com/common/survey.aspx?scid=sw;en;1848%27,%20%27_blank%27);void(0);http://support.microsoft.com/gp/csahttps://profile.microsoft.com/RegSysProfileCenter/default.aspxhttp://support.microsoft.com/contactus/?ws=supporthttp://go.microsoft.com/?linkid=4412892http://go.microsoft.com/?linkid=4412893http://go.microsoft.com/?linkid=4412894http://support.microsoft.com/gethelp/default.aspx?content=kb;en-us;914277http://support.microsoft.com/gethelp/default.aspx?content=kb;en-us;914277http://support.microsoft.com/gethelp/default.aspx?content=kb;en-us;914277http://go.microsoft.com/?linkid=4412894http://go.microsoft.com/?linkid=4412893http://go.microsoft.com/?linkid=4412892http://support.microsoft.com/contactus/?ws=supporthttps://profile.microsoft.com/RegSysProfileCenter/default.aspxhttp://support.microsoft.com/gp/csahttp://window.open%28%27http//support.microsoft.com/common/survey.aspx?scid=sw;en;1848%27,%20%27_blank%27);void(0);http://www.microsoft.com/en/us/default.aspx