|
|
|
date: Sat, 26 Jul 2008 15:48:56 -0700,
group: microsoft.public.sqlserver.newusers
back
SQL Server 2005 on Windows Server 2008 - sqlcmd can not connect
SQL Server 2005 SP2 (9.0.3068) installed on Windows Server 2008 Enterprise.
When I installed SQL Server I specified a "named instance" with the name
TEAMFOUNDATION.
This appears to be working OK; I have Team Foundation Server and SharePoint
3.0 installed on another Windows Server 2008 server and they can use this
instance of SQL Server without any problem.
I've done the steps from KB 914277 to enable Remote Connection using both
TCP/IP and Named Pipes.
Using the instructions in
http://msdn.microsoft.com/en-us/library/ms345483.aspx, executing the command
in the SQL Server Management Studio Database Engine Query window, I moved
the files for one of the databases (WSS_Search_TEAMFOUNDATION) from the
default location to a new disk. This appears to have been successful.
So, by all appearances, the SQL Server instance is up and running and
working OK.
But, when I attempt to open an sqlcmd window, I get the error below. I've
tried to launch sqlcmd from both a "normal" and "elevated" Command Prompt,
but get the same error each time. I'm logged on via RDP to the server that
has the SQL Server database engine installed using a domain user account
that is a member of the local Administrators group. This is the same user
account I was logged on with when I installed SQL Server 2005.
What do I need to do to get sqlcmd to work?
Here's the error I get:
C:\Windows\system32>sqlcmd -s sqlserver\teamfoundation
HResult 0x2, Level 16, State 1
Named Pipes Provider: Could not open a connection to SQL Server [2].
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 connec
tions..
Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired.
--
Bruce Sanderson
http://members.shaw.ca/bsanders
It is perfectly useless to know the right answer to the wrong question.
date: Sat, 26 Jul 2008 15:48:56 -0700
author: Bruce Sanderson am
Re: SQL Server 2005 on Windows Server 2008 - sqlcmd can not connect
Have you restarted the service after making the changes as per KB 914277?
"Bruce Sanderson" <bsanders@newsgroups.nospam> wrote in message
news:uQPVKH37IHA.1428@TK2MSFTNGP06.phx.gbl...
> SQL Server 2005 SP2 (9.0.3068) installed on Windows Server 2008
> Enterprise. When I installed SQL Server I specified a "named instance"
> with the name TEAMFOUNDATION.
>
> This appears to be working OK; I have Team Foundation Server and
> SharePoint 3.0 installed on another Windows Server 2008 server and they
> can use this instance of SQL Server without any problem.
> I've done the steps from KB 914277 to enable Remote Connection using both
> TCP/IP and Named Pipes.
>
> Using the instructions in
> http://msdn.microsoft.com/en-us/library/ms345483.aspx, executing the
> command in the SQL Server Management Studio Database Engine Query window,
> I moved the files for one of the databases (WSS_Search_TEAMFOUNDATION)
> from the default location to a new disk. This appears to have been
> successful.
>
> So, by all appearances, the SQL Server instance is up and running and
> working OK.
>
> But, when I attempt to open an sqlcmd window, I get the error below. I've
> tried to launch sqlcmd from both a "normal" and "elevated" Command Prompt,
> but get the same error each time. I'm logged on via RDP to the server
> that has the SQL Server database engine installed using a domain user
> account that is a member of the local Administrators group. This is the
> same user account I was logged on with when I installed SQL Server 2005.
>
> What do I need to do to get sqlcmd to work?
>
> Here's the error I get:
>
> C:\Windows\system32>sqlcmd -s sqlserver\teamfoundation
> HResult 0x2, Level 16, State 1
> Named Pipes Provider: Could not open a connection to SQL Server [2].
> 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 connec
> tions..
> Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired.
> --
> Bruce Sanderson
> http://members.shaw.ca/bsanders
>
> It is perfectly useless to know the right answer to the wrong question.
>
>
>
date: Sun, 27 Jul 2008 12:27:24 +0800
author: bass_player
Re: SQL Server 2005 on Windows Server 2008 - sqlcmd can not connect
Some possibilities:
On Windows Server 2008 the firewall is on by default. Have you made an
exception for either the SQL Server exe or the SQL Server port? (And since
you are using a named instance, SQL Server may be using dynamic ports, so
SQL Server may not be listening on port 1433.)
Do you have a SQL Server login for your connection. Windows Server 2008
(like Vista) won't let you automatically use your Administrator group
membership.
--
Rick Byham (MSFT), SQL Server Books Online
This posting is provided "AS IS" with no warranties, and confers no rights.
"bass_player" wrote in message
news:eIhBTE67IHA.2348@TK2MSFTNGP06.phx.gbl...
> Have you restarted the service after making the changes as per KB 914277?
>
> "Bruce Sanderson" <bsanders@newsgroups.nospam> wrote in message
> news:uQPVKH37IHA.1428@TK2MSFTNGP06.phx.gbl...
>> SQL Server 2005 SP2 (9.0.3068) installed on Windows Server 2008
>> Enterprise. When I installed SQL Server I specified a "named instance"
>> with the name TEAMFOUNDATION.
>>
>> This appears to be working OK; I have Team Foundation Server and
>> SharePoint 3.0 installed on another Windows Server 2008 server and they
>> can use this instance of SQL Server without any problem.
>> I've done the steps from KB 914277 to enable Remote Connection using both
>> TCP/IP and Named Pipes.
>>
>> Using the instructions in
>> http://msdn.microsoft.com/en-us/library/ms345483.aspx, executing the
>> command in the SQL Server Management Studio Database Engine Query window,
>> I moved the files for one of the databases (WSS_Search_TEAMFOUNDATION)
>> from the default location to a new disk. This appears to have been
>> successful.
>>
>> So, by all appearances, the SQL Server instance is up and running and
>> working OK.
>>
>> But, when I attempt to open an sqlcmd window, I get the error below.
>> I've tried to launch sqlcmd from both a "normal" and "elevated" Command
>> Prompt, but get the same error each time. I'm logged on via RDP to the
>> server that has the SQL Server database engine installed using a domain
>> user account that is a member of the local Administrators group. This is
>> the same user account I was logged on with when I installed SQL Server
>> 2005.
>>
>> What do I need to do to get sqlcmd to work?
>>
>> Here's the error I get:
>>
>> C:\Windows\system32>sqlcmd -s sqlserver\teamfoundation
>> HResult 0x2, Level 16, State 1
>> Named Pipes Provider: Could not open a connection to SQL Server [2].
>> 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 connec
>> tions..
>> Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired.
>> --
>> Bruce Sanderson
>> http://members.shaw.ca/bsanders
>>
>> It is perfectly useless to know the right answer to the wrong question.
>>
>>
>>
date: Mon, 28 Jul 2008 09:51:04 -0700
author: Rick Byham, \(MSFT\)
RE: SQL Server 2005 on Windows Server 2008 - sqlcmd can not connect
Hi Bruce,
I understand that you could not connect to your SQL Server 2005 instance from another
Windows Server 2008 server.
If I have misunderstood, please let me know.
To narrow down this issue, would you mind first answering me the following two questions?
1. Did this issue happen before you change the database files location?
2. Did you try the steps of "Enable the SQL Server Browser service" and "Create exceptions in
Windows Firewall" in the KB article, http://support.microsoft.com/kb/914277/en-us? If not,
please try it first.
3. Could you connect to your SQL Server 2005 instance from SQL Server Management Studio
on your remote client server?
Generally regarding the error message, there are several typical causes that documented in
this article, http://msdn.microsoft.com/en-us/library/ms190181.aspx. I recommend that you
refer to the section "Typical Causes of this Error" and check if the resolutions work for you.
Please feel free to let me know if you have any other questions or concerns. Have a nice day!
Best regards,
Charles Wang
Microsoft Online Community Support
===========================================================
Delighting our customers is our #1 priority. We welcome your
comments and suggestions about how we can improve the
support we provide to you. Please feel free to let my manager
know what you think of the level of service provided. You can
send feedback directly to my manager at: msdnmg@microsoft.com.
===========================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notifications.
Note: The MSDN Managed Newsgroup support offering is for
non-urgent issues where an initial response from the community
or a Microsoft Support Engineer within 1 business day is acceptable.
Please note that each follow up response may take approximately
2 business days as the support professional working with you may
need further investigation to reach the most efficient resolution.
The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by
contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
============================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
=========================================================
date: Mon, 28 Jul 2008 03:46:39 GMT
author: (Charles Wang [MSFT])
Re: SQL Server 2005 on Windows Server 2008 - sqlcmd can not connect
Thanks for the follow up. The subject installation is a small experimental system Im working on
partly to gain some knowledge and experience with Team Foundation and SQL Server.
Unfortunately, I have not had any time to devote to this in the last few days.
Ill take a look at this over the weekend.
Im issuing the sqlcmd command from an RDP session (logged on with and administrative user account)
of the server that is running SQL Server, NOT from another server. I will try logging on at the
console of that server, but I cant see that making any difference.
As to your questions:
1.. Dont know never tried
2.. I believe so, but will verify
3.. Never tried I use the SQL Server Management Studio only from an RDP session (logged on with
and administrative user account) of the server running SQL Server
--
Bruce Sanderson
http://members.shaw.ca/bsanders/
It's perfectly useless to know the right answer to the wrong question.
""Charles Wang [MSFT]"" wrote in message
news:NW8xPSG8IHA.4912@TK2MSFTNGHUB02.phx.gbl...
> Hi Bruce,
> I understand that you could not connect to your SQL Server 2005 instance from another
> Windows Server 2008 server.
> If I have misunderstood, please let me know.
>
> To narrow down this issue, would you mind first answering me the following two questions?
> 1. Did this issue happen before you change the database files location?
>
> 2. Did you try the steps of "Enable the SQL Server Browser service" and "Create exceptions in
> Windows Firewall" in the KB article, http://support.microsoft.com/kb/914277/en-us? If not,
> please try it first.
>
> 3. Could you connect to your SQL Server 2005 instance from SQL Server Management Studio
> on your remote client server?
>
> Generally regarding the error message, there are several typical causes that documented in
> this article, http://msdn.microsoft.com/en-us/library/ms190181.aspx. I recommend that you
> refer to the section "Typical Causes of this Error" and check if the resolutions work for you.
>
> Please feel free to let me know if you have any other questions or concerns. Have a nice day!
>
> Best regards,
> Charles Wang
> Microsoft Online Community Support
> ===========================================================
> Delighting our customers is our #1 priority. We welcome your
> comments and suggestions about how we can improve the
> support we provide to you. Please feel free to let my manager
> know what you think of the level of service provided. You can
> send feedback directly to my manager at: msdnmg@microsoft.com.
> ===========================================================
> Get notification to my posts through email? Please refer to
> http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notifications.
>
> Note: The MSDN Managed Newsgroup support offering is for
> non-urgent issues where an initial response from the community
> or a Microsoft Support Engineer within 1 business day is acceptable.
> Please note that each follow up response may take approximately
> 2 business days as the support professional working with you may
> need further investigation to reach the most efficient resolution.
> The offering is not appropriate for situations
> that require urgent, real-time or phone-based interactions or complex
> project analysis and dump analysis issues. Issues of this nature are best
> handled working with a dedicated Microsoft Support Engineer by
> contacting Microsoft Customer Support Services (CSS) at
> http://msdn.microsoft.com/subscriptions/support/default.aspx.
> ============================================================
> This posting is provided "AS IS" with no warranties, and confers no rights.
> =========================================================
>
>
>
date: Thu, 31 Jul 2008 09:36:17 -0700
author: Bruce Sanderson am
Re: SQL Server 2005 on Windows Server 2008 - sqlcmd can not connect
Hi Bruce,
Thank you for your response and let me know the situation.
In addition to check SQL Browser Services and Windows Firewall as mentioned on the KB article, when
you have time I recommend that you also check the following conditions:
1. Check if your SQL Server instance allows remote connection.
On your SQL Server side, open Start->All Programs->Microsoft SQL Server 2005->Configuration Tools->
SQL Server 2005 Surface Area Configuration, click Surface Area Configuration for Services and
Connections, select your SQL Server instance, go to Database Engine->Remote Connections, ensure that
"Local and remote connections" and "Using both TCP/IP and named pipes" are checked. If they are not
checked, please enable them and restart your SQL Server service.
2. Check which TCP port your SQL Server instance is listening.
On your SQL Server side, open Start->All Programs->Microsoft SQL Server 2005->Configuration Tools->
SQL Server Configuration Manager, go to SQL Server 2005 Network Configuration->Protocols for <your
SQL Server instance name>, double click TCP/IP, switch to the IP Address tab and you will find what the
TCP port is being listened by your SQL Server instance.
3. Check if your client request can reach to the TCP port.
On your client side, run "telnet <servername> <tcp port>" from command line to check if you can access
the TCP port on your remote server. If this is denied, it is most likely that your Windows Firewall block
the TCP port and I recommend that you add it the the Exception list.
Look forward to your next response and hope that we can get the resolution soon. Have a nice day!
Best regards,
Charles Wang
Microsoft Online Community Support
=========================================================
Delighting our customers is our #1 priority. We welcome your
comments and suggestions about how we can improve the
support we provide to you. Please feel free to let my manager
know what you think of the level of service provided. You can
send feedback directly to my manager at: msdnmg@microsoft.com.
=========================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
=========================================================
date: Fri, 01 Aug 2008 06:27:56 GMT
author: (Charles Wang [MSFT])
Re: SQL Server 2005 on Windows Server 2008 - sqlcmd can not connect
Problem solved! Being new to SQL Server, I assumed that sqlcmd would
connect to the local SQL Server instance automatically, this turns out to be
not the case (I'm logged on at the computer that has the SQL Server instance
installed - I'm not trying to use sqlcmd remotely).
The command:
sqlcmd -S SQLSERVER\TEAMFOUNDATION
successfully connected to the database and I was then able to issue SQL
statements etc.
I have to launch the Command Prompt window elevated (Run as Administrator)
and key in upper case (as shown above) to get it to work.
No configuration changes were required. I did verify that Remote
Connections are enabled (item 1 from your note) and that the SQL Browser
service is configured to start automatically (SQL Server Configuration
Manager shows that all the SQL Server services are running). I've
configured the firewall sqlserver and sql browser. This is all documented
quite well in the Team Foundation Service installation documentation (see
http://go.microsoft.com/fwlink/?LinkId=79226).
Thank you for your posts and follow up.
--
Bruce Sanderson
http://members.shaw.ca/bsanders
It is perfectly useless to know the right answer to the wrong question.
""Charles Wang [MSFT]"" wrote in message
news:KxUY%23Q68IHA.4376@TK2MSFTNGHUB02.phx.gbl...
> Hi Bruce,
> Thank you for your response and let me know the situation.
>
> In addition to check SQL Browser Services and Windows Firewall as
> mentioned on the KB article, when
> you have time I recommend that you also check the following conditions:
> 1. Check if your SQL Server instance allows remote connection.
> On your SQL Server side, open Start->All Programs->Microsoft SQL Server
> 2005->Configuration Tools->
> SQL Server 2005 Surface Area Configuration, click Surface Area
> Configuration for Services and
> Connections, select your SQL Server instance, go to Database
> Engine->Remote Connections, ensure that
> "Local and remote connections" and "Using both TCP/IP and named pipes" are
> checked. If they are not
> checked, please enable them and restart your SQL Server service.
>
> 2. Check which TCP port your SQL Server instance is listening.
> On your SQL Server side, open Start->All Programs->Microsoft SQL Server
> 2005->Configuration Tools->
> SQL Server Configuration Manager, go to SQL Server 2005 Network
> Configuration->Protocols for <your
> SQL Server instance name>, double click TCP/IP, switch to the IP Address
> tab and you will find what the
> TCP port is being listened by your SQL Server instance.
>
> 3. Check if your client request can reach to the TCP port.
> On your client side, run "telnet <servername> <tcp port>" from command
> line to check if you can access
> the TCP port on your remote server. If this is denied, it is most likely
> that your Windows Firewall block
> the TCP port and I recommend that you add it the the Exception list.
>
> Look forward to your next response and hope that we can get the resolution
> soon. Have a nice day!
>
> Best regards,
> Charles Wang
> Microsoft Online Community Support
> =========================================================
> Delighting our customers is our #1 priority. We welcome your
> comments and suggestions about how we can improve the
> support we provide to you. Please feel free to let my manager
> know what you think of the level of service provided. You can
> send feedback directly to my manager at: msdnmg@microsoft.com.
> =========================================================
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> =========================================================
>
date: Sun, 3 Aug 2008 16:00:06 -0700
author: Bruce Sanderson am
|
|