After installing SQL Server 2008 R2, it wants a server name.

I tried SQLCMD -L on cmd, but it shows the error below:

Data source name not found and no default driver specified

What am I doing wrong?

Any kind of help will be appreciated.

  • What wants a servername? Stand alone default instance will be the host name. named instance...look in services.msc if you don't remember what you called it
    – Kevin3NF
    Dec 19, 2016 at 19:14
  • 1
    When you say 'it wants a server name...', what is IT? Did you install a default instance or a named instance? Are you local on the computer that you installed Sql Server when you run the SQLCMD command? Is your installed instance of Sql Server actually up and running? Dec 19, 2016 at 19:15

2 Answers 2


You can go with two methods as given in answers to the Stack Overflow question How to find server name of SQL Server Management Studio.

User PoweredByOrange:

Open up SQL Server Configuration Manager (search for it in the Start menu). Click on SQL Server Services. The instance name of SQL Server is in parenthesis inline with SQL Server service. If it says MSSQLSERVER, then it's the default instance. To connect to it in Management Studio, just type . (dot) OR (local) and click Connect. If the instance name is different, then use .[instance name] to connect to it (for example if the instance name is SQL2008, connect to .\SQL2008).

Also make sure SQL Server and SQL Server Browser services are running, otherwise you won't be able to connect.


User sansa:

Run this Query to get the name


On the server, go to SQL Server Configuration Manager.

Under SQL Server Services in the left pane, you will click and see Name, State, Start Mode, and Log On As for columns.

You should see SQL Server(NAME). Hopefully it is running, right click and go to properties. Click on the Service tab, you will see the Host Name, Name, Process ID, and other information here.

Please note, it's possible to install SQL Server Management Studios without installing and creating a SQL Server Database Engine. You may have to re-enter the installation to create and configure a Database Engine to connect to.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.