共同探讨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.aspx51Testing软件测试网m)~UO,e j
Uo6}\:y8So
I8|0The information in this posting is superseded by the following KB Article:51Testing软件测试网/d7H+m
nml,D!T}8\:I
914277 How to configure SQL Server 2005 to allow remote connections51Testing软件测试网 [9q"r cEY#~
http://support.microsoft.com/default.aspx?scid=kb;EN-US;914277
z I$l t1_K8b-d0
yU nb:P0-----------------------------------------------------------------------------------
q7Pa(nr0Some people have been having issues when trying to make remote connections
\p*h\+cNY e0to SQL Express. This document will hopefully clarify most of the issues
Jo-d^ B i*n1e^0around remote connections.51Testing软件测试网U[8_ lHIw[
51Testing软件测试网"s&qgpA
First, networking protocols are disabled by default in SQL Server Express.51Testing软件测试网1d;v&ni4z
Thus, if someone simply installs Express and chooses all the defaults, SQL51Testing软件测试网@9qe5XgO5|og
Server Express will only be able to have connections originating on the51Testing软件测试网%?,l V zj3`
local machine where SQL Server is installed.51Testing软件测试网+o+li\-^]V,I
51Testing软件测试网%wV'E$zL}
To enable SQL Server Express to accept remote connections we need to perform.
'E
E ^)u+r0the following steps:51Testing软件测试网+IRF(Pah!{
2n
~o4|~gd0STEP 1: Enabling TCP/IP51Testing软件测试网
wuZ&OB:@,J ywM
,p
Z S!~&]"M2D!gb*T0First we must tell SQL Server Express to listen on TCP/IP, to do this51Testing软件测试网v"i7y^.iFK
perform. the following steps:51Testing软件测试网9che,J0W)trG Gd
!ej8kpYL%fP9Hr%A01. Launch the SQL Server Configuration Manager from the "Microsoft SQL51Testing软件测试网 USW%qJ3sF){ A
Server 2005 CTP" Program menu
#kov,f1z}Q!L02. Click on the "Protocols for SQLEXPRESS" node,51Testing软件测试网8S(W0A0bPpp
3. Right click on "TCP/IP" in the list of Protocols and choose, "Enable"
3`4U-X'hDH$['I5v1O0
B8c-Jzqr051Testing软件测试网
R?p"t7FK2e
STEP 2: To Browse or not to Browse51Testing软件测试网PrP)x'Ro!U-a
Next, we have to determine if we want the SQL Browser service to be runningor not. The benefit of having this service run is that users connectingremotely do not have to specify the port in the connection string. Note: Itis a security best practice to not run the SQLBrowser service as it reducesthe 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 (Notusing SQL Browser service) perform. the following steps else skip thesesteps:1. Launch the SQL Server Configuration Manager from the "Microsoft SQLServer 2005 CTP" Program menu2. Click on the "Protocols for SQLEXPRESS" node3. Click on the "TCP/IP" child node4. You will notice an entry on the right panel for "IPAll", right clickon this and select, "Properties"5. Clear out the value for "TCP Dynamic Ports"6. Give a TcpPort number to use when making remote connections, forpurposes of this example lets choose, "2301"At this point you should restart the SQL Server Express service. At thispoint you will be able to connect remotely to SQL Express. A way I like tocheck the connection is my using SQLCMD from a remote machine and connectinglike this:SQLCMD -E -S YourServer\SQLEXPRESS,2301The "," 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, thisshould address the remaining issue.OPTION B: If you want to use SQL Browser service perform. these steps: Note:
SS
Ro F5L2Z0 You will need to make this registry key change if you are using the April
_/ggg2\,^s0 CTP or earlier versions:
rU5_Q R
h(Fi0 To enable sqlbrowser service to listen on the port 1434, the following 51Testing软件测试网2f,X.G+^p;TAK y%dpV
registry key must be set to 1
{(Vl3Oe#[9_S051Testing软件测试网
|9jcC1c"i~6G~n
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\90\SQL 51Testing软件测试网o9T1S-vb~0];j
Browser\Ssrplistener Next, restart the sqlbrowser service.51Testing软件测试网|Tx$\Jc_
1. Start the SQL Browser ServiceSTEP 3: Firewall..?
+t `Qfp
II0 At this point you should be able to remotely connect. If you stillcan't chances are you have a firewall configured on the computer where SQLExpress is running. The instructions below are for Windows XP SP2'sfirewall settings. To enable the firewall to allow SQL Server Express traffic:1. Launch the Windows Firewall configuration tool from the controlpanel.2. Click the Exceptions Tab3. Click the "Add Programs." button and select "sqlservr.exe" from thelocation where you install SQL Server ExpressYou should be able to remotely connect. Note, you can get more restrictiveby just specifying the port number that will be allowed (used best whenconfigured with Option A).Note: If you chose to use the SQL Browser service, you must also addsqlbrowser service executable to the exception list as it listens on udpport 1434.
收藏
举报
TAG: