December 22, 2006 at 7:08 pm
Hi,
My laptop runs in Microsoft Windows XP Professional . I installed Microsoft SQL Server 2005 Express Edition (SQLEXPR.EXE ) I selected Mixed Windows and SQL Authorization. I chose g0612s for my password to the userid sa.
I am unable to successfully run sqlcmd. I reproduce here below what I got in DOS command. Please help.
C:\>sqlcmd -U sa
Password: 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 connections..
Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired.
C:\>
December 25, 2006 at 10:20 pm
If you have Windows Firewall turned on, turn it off.
http://support.microsoft.com/kb/328306/en-us
MohammedU
Microsoft SQL Server MVP
December 28, 2006 at 10:58 am
I have turned off the Windows Firewall and tried again. I still get the following error message.
C:\>sqlcmd -U sa
Password: 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 establi
shing a connection to the server. When connecting to SQL Server 2005, this failu
re may be caused by the fact that under the default settings SQL Server does not
allow remote connections..
Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired.
C:\>
I am also looking at the website "http://support.microsoft.com/kb/328306/en-us" to get my problem solved. Please let me know if you find the solution for this problem.
December 28, 2006 at 11:10 am
SQL Server 2005 Connectivity Issue Troubleshooting...
http://blogs.msdn.com/sql_protocols/archive/2005/10/22/483684.aspx
MohammedU
Microsoft SQL Server MVP
December 28, 2006 at 12:33 pm
Thanks Mohammed.
Your link has solved my problem.
I noticed there that I missed using -S myServerName in my DOS command.
I tried the following DOS command, it went well and got the prompt to go beyond.
sqlcmd.exe -S myServerName -U sa -P myPassword
Thanks again.
Samy
September 5, 2008 at 2:32 pm
I have thw same proble when I try to run the sqlcmd.exe fro the command prompt. I get the message that "maybe remote connection is not possible to this computer."
at the command prompt, I do type -S mycomputername, but it still does not work.
Faye
September 9, 2008 at 1:38 pm
THANK YOU!!!
Viewing 7 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy