Re: SQL Server 2005 Express Connection
- From: "Roger Wolter[MSFT]" <rwolter@xxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 17 Apr 2006 09:47:19 -0700
Here's the FAQ entry on setting up remote Express connections:
Some people have been having issues when trying to make remote connections
to SQL Express. This document will hopefully clarify most of the issues
around remote connections.
First, networking protocols are disabled by default in SQL Server Express.
Thus, if someone simply installs Express and chooses all the defaults, SQL
Server Express will only be able to have connections originating on the
local machine where SQL Server is installed.
To enable SQL Server Express to accept remote connections we need to perform
the following steps:
STEP 1:
First we must tell SQL Server Express to listen on TCP/IP, to do this
perform the following 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. Right click on "TCP/IP" in the list of Protocols and choose, "Enable"
STEP 2:
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:
You will need to make this registry key change if you are using the April
CTP or earlier versions:
To enable sqlbrowser service to listen on the port 1434, the following
registry key must be set to 1
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\90\SQL
Browser\Ssrplistener
Next, restart the sqlbrowser service.
1. Start the SQL Browser Service
STEP 3:
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.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"SoHeLL" <SoHeLL@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:F38BE2D7-F0CD-4434-8C43-1662BC8D2C4A@xxxxxxxxxxxxxxxx
Hello I have a problem to connect to the SQL Server 2005 Express Edition.
I
have the Visual Studio .Net 2005 and the SQL Server Management Studio
Express
CTP but I cannot connect to the Database from the client to the database
instance through the network. Could be a Domain problem, i found out from
the
german discussion group members and experienced discussion group staff. I
receive the error translated: "Error while connecting with the user
'SERVER\GUEST' (Error: 18456)".
My computers are not in the same domain, cause i could'nt configure it.
But
the client and the server (named SERVER) are in the same workgroup but not
domain. They receive the ip through a router via DHCP-System.
What else is helpful...This screenshot:
http://mitglied.lycos.de/SoheilAmjadi/screenshot3.JPG
it shows, that the network databases are found but i cannot connect. One
of
the memebers in the german section told me to set up a server
authentification. But I don't know if this is the right solution, and i
don't
know how to configure that.
Something in general: Isn't there something like a check-list or
documentation that provides detailed information how to set up the
connection? That is ridicilus - if that is so!
Thanks
Soheil A.
.
- Follow-Ups:
- Re: SQL Server 2005 Express Connection
- From: Javier
- Re: SQL Server 2005 Express Connection
- Prev by Date: Re: ISQL query fails after reboot
- Next by Date: RE: sql server auto logging in with my old window password
- Previous by thread: Re: CurrentProject.IsConnected is reporting on what?
- Next by thread: Re: SQL Server 2005 Express Connection
- Index(es):