tags:

views:

133

answers:

3

i am running this in the command line:

sqlcmd -s .\SQLexpress

and the output i get is:

HResult 0x2, Level 16, State 1 Named Pipes Provider: Could not open a connection to SQL Server [2]. Sqlcmd: Error: Microsoft SQL Server Native Client 10.0 : A network-related or in stance-specific error has occurred while establishing a connection to SQL Server . Server is not found or not accessible. Check if instance name is correct and i f SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.. Sqlcmd: Error: Microsoft SQL Server Native Client 10.0 : Login timeout expired.

when i run this:

c:\Program Files (x86)\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\Binn\sqlservr.exe" -sSQLEXPRESS

i get: server error 17058 severity 16, state 1, could not open error log file

however this works:

osql -S .\SQLExpress -E
+1  A: 

Go to Start -> Run, type "C:\Windows\System32\mmc.exe /32 "C:\Windows\system32\SQLServerManager.msc", then go to SQL Native Client Configuration, Client Protocols and check that shared memory, tcp/ip and named pipes are enabled.

Andrey
im on 64bit ...
I__
ok, just go to Start \ Microsoft SQL Server 2005 \ Configuration Tools \ SQL Server Configuration Manager
Andrey
its actually 2008 not 2005
I__
ok, just replace 2005 to 2008 in my message. procesure is same.
Andrey
+1  A: 

Check this link:

Ardman
its running, i did a regular installation and didnt change anything
I__
Sorry, just amended my post as I found a better solution. There are many things that can cause this message and the link above is helpful.
Ardman
thanks but i am on 2008 not 2005
I__
+1  A: 

Sorry, should have seen with version 10. Try here or here

Ardman