Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to connect Sqlcmd to the server?

I just installed SQL Server 2008, and I wanted to use the command editor to execute queries.

To do that I opened the command prompt, and I typed

Sqlcmd -S Serverinstance 

but I got an error saying :

Named Pipes Provider: Could not open a connection to SQL Server [53].
Sqlcmd : erreur : Microsoft SQL Server Native Client 10.0 : A network-related or instance-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 if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online..
Sqlcmd : erreur : Microsoft SQL Server Native Client 10.0 : Login timeout expired

What should I do to get it connected to the server so I can proceed?

Thank you :D.

like image 751
Zakaria Marrah Avatar asked Jan 07 '13 14:01

Zakaria Marrah


1 Answers

(This one is going to sounds silly) my problem was that I wasn't using capital 'S'

Eg:

C:\> SQLCMD -S localhost\sqlexpress 
like image 187
Christian Payne Avatar answered Sep 29 '22 11:09

Christian Payne