共同探讨QTP相关问题

How to: Configure Express to accept remote connections

上一篇 / 下一篇  2010-10-14 10:42:23 / 个人分类:数据库

Content from http://blogs.msdn.com/b/sqlexpress/archive/2005/05/05/415084.aspx
Bz.sJ/y1X#]WHy0
51Testing软件测试网3K0H4x5xZ4D(z0K n

The information in this posting is superseded by the following KB Article:51Testing软件测试网,XsW}+LE9i

914277 How to configure SQL Server 2005 to allow remote connections
ei[ w5t0http://support.microsoft.com/default.aspx?scid=kb;EN-US;91427751Testing软件测试网5x3yazm
51Testing软件测试网W KRGO$V b ?
-----------------------------------------------------------------------------------

8Ti^~6e1T(b'I0

Some people have been having issues when trying to make remote connections51Testing软件测试网0yC+vAH"D
to SQL Express.  This document will hopefully clarify most of the issues51Testing软件测试网9|9]+Z"A`RU7c
around remote connections.51Testing软件测试网*`v8d8H#e1T x
51Testing软件测试网7u1E)M0@ Dj%@x{ {
First, networking protocols are disabled by default in SQL Server Express.
!kchB%Jf9Ys0?0Thus, if someone simply installs Express and chooses all the defaults, SQL
:~?4NF[K0Server Express will only be able to have connections originating on the51Testing软件测试网+OX&UOS1feMX
local machine where SQL Server is installed.
Du$W5qd}W051Testing软件测试网j6E9O0uG M9b ?
To enable SQL Server Express to accept remote connections we need to perform.51Testing软件测试网NI,~7fj%H/c
the following steps:51Testing软件测试网Nlw} O^)_
51Testing软件测试网*GB/r%p t
STEP 1: Enabling TCP/IP51Testing软件测试网0M1c-|3w6j
51Testing软件测试网"C4kGq w/~;]xS Q
First we must tell SQL Server Express to listen on TCP/IP, to do this51Testing软件测试网^6x*wml
perform. the following steps:
1?$S sg2~051Testing软件测试网 n(hHl y-M$hD"Q
1. Launch the SQL Server Configuration Manager from the "Microsoft SQL51Testing软件测试网A4ubw tv1M9x
Server 2005 CTP" Program menu
(aSt4a(U Q2XuC02. Click on the "Protocols for SQLEXPRESS" node,
d%Q]:I8LuJ9Ah9p03. Right click on "TCP/IP" in the list of Protocols and choose, "Enable"
*[A]|0Rc!X5f*]!Fe HC0
s5K,T Lx051Testing软件测试网(Gk.g3li-Z#O

STEP 2: To Browse or not to Browse
7U}P `m t(q0

Next, we have to determine if we want the SQL Browser service to be running
or not.  The benefit of having this service run is that users connecting
remotely do not have to specify the port in the connection string.  Note: It
is a security best practice to not run the SQLBrowser service as it reduces
the attack surface area by eliminating the need to listen on an udp port.

OPTION A:If you want to always specify a TCP port when connecting (Not
using SQL Browser service) perform. the following steps else skip these
steps:

1.      Launch the SQL Server Configuration Manager from the "Microsoft SQL
Server 2005 CTP" Program menu

2.      Click on the "Protocols for SQLEXPRESS" node

3.      Click on the "TCP/IP" child node

4.      You will notice an entry on the right panel for "IPAll", right click
on this and select, "Properties"

5.      Clear out the value for "TCP Dynamic Ports"

6.      Give a TcpPort number to use when making remote connections, for
purposes of this example lets choose, "2301"


At this point you should restart the SQL Server Express service.  At this
point you will be able to connect remotely to SQL Express.  A way I like to
check the connection is my using SQLCMD from a remote machine and connecting
like this:

SQLCMD -E -S YourServer\SQLEXPRESS,2301

The "," in the server name tells SQCMD it's a port.

So you've tried this and still get an error.  Take a look at Step 3, this
should address the remaining issue.

OPTION B:  If you want to use SQL Browser service perform. these steps:

            Note:51Testing软件测试网3g4[Nm q jA
            You will need to make this registry key change if you are using the April 51Testing软件测试网7s4Fl6~I
            CTP or earlier versions:
JDw%|k N8T&l\0

            To enable sqlbrowser service to listen on the port 1434, the following 
.d G:e2PmMsr#t+R0            registry key must be set to 151Testing软件测试网7dV*q\8x}

*E:L} Ze0            HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\90\SQL 
1A&]6lvT Y0            Browser\Ssrplistener


            Next, restart the sqlbrowser service.
(JTzgV0

      1. Start the SQL Browser Service

STEP 3: Firewall..?
zL0p"\V6kYb0

      At this point you should be able to remotely connect.  If you still
can't chances are you have a firewall configured on the computer where SQL
Express is running.  The instructions below are for Windows XP SP2's
firewall settings.

      To enable the firewall to allow SQL Server Express traffic:

1.      Launch the Windows Firewall configuration tool from the control
panel.

2.      Click the Exceptions Tab

3.      Click the "Add Programs." button and select "sqlservr.exe" from the
location where you install SQL Server Express


You should be able to remotely connect.  Note, you can get more restrictive
by just specifying the port number that will be allowed (used best when
configured with Option A).

Note: If you chose to use the SQL Browser service, you must also add
sqlbrowser service executable to the exception list as it listens on udp
port 1434.

TAG:

 

评分:0

我来说两句

Open Toolbar