views:

2282

answers:

2

Hi All,

Env.: Vista SP1, SQL Server Express 2005

I'm able to connect to my localhost SQL Server using SQL Server Management Studio, using Windows authentication and, to the best of my knowledge, all default parameters, including network protocol.

Now I try to connect using sqlcmd.exe to no avail:

C:\Program Files\Microsoft SQL Server\90\Tools\Binn>sqlcmd -S \\PCSERGEHOME\SQLE
XPRESS
HResult 0x57, Level 16, State 1
Named Pipes Provider: Invalid parameter(s) found [87].
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.

I also tried to use -U PCSERGEHOME\Serge. I'm then prompted for my password but the result is the same.

TIA for your help.

+3  A: 

Lose the leading \\

Actually, try .\XPRESS (period slash instance)

Dave
Aargh! I had it right under my eyes in the SSMS login dialog. Thanks!
Serge - appTranslator
Doh, missed it too
Robert Wagner
A: 

Try

  • Disabling the firewall
  • Using localhost instead
  • Check the Server setup (in management studio) to make sure remote connections are enabled
  • Check the settings in Surface Area configuration and make sure all the transports are enabled and remote connections are enabled
Robert Wagner