Cannot connect to SQL Server Express using sqlcmd.exe

Env .: Vista SP1, SQL Server Express 2005

I can connect to my local SQL Server using SQL Server Management Studio using Windows Authentication and all defaults as far as I know, including the network protocol.

Now I am trying 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 using -U PCSERGEHOME \ Serge. I will then be prompted for a password, but the result is the same.

TIA for your help.

+1


source to share


2 answers


Lose leading \\



Actually, try it. \ XPRESS (period slab instance)

+4


source


Try



  • Disable Firewall
  • Using localhost instead
  • Check your server setup (in management studio) to make sure remote connections are enabled.
  • Check the settings in the Surface Area setup and make sure all transports are enabled and remote connections are enabled.
0


source







All Articles