Connecting to SQL Server Express – What is my server name?

By | December 11, 2017
Questions:

I was just given a laptop to perform some development from a client and I am currently in the process of setting it up. Visual Studio 2010 is installed as well as SQL Server Management Studio 2008 R2. I’m trying to open SQL Server Management Studio to connect to the database but so far am not having much luck. I’m used typing in for a server name something like…

localhost
(local)
SQLEXPRESS

None of these are working.

So my question is: How can I tell what type of SQL Server installation and configuration I have on this machine, and how can I discover what server name I need to use in order to properly connect to it?

–Addition——————————————–

I looked into the services as directed and found a few instances as indicated. SQLEXPRESS and MSSQLSERVER. I have tried to login with both of those options in these configurations…

SQLEXPRESS
MSSQLSERVER
computername\SQLEXPRESS
computername\MSSQLSERVER
.\SQLEXPRESS
.\MSSQLSERVER

None of these worked. I also altered the ‘Log On As’ property of the services from ‘Network Service’ to ‘Local System’ and tried them again. Still no success.

Answers:

You should be able to see it in the Services panel. Look for a servicename like Sql Server (MSSQLSERVER). The name in the parentheses is your instance name.

Questions:
Answers:

Instead of giving:

./SQLEXPRESS //in the Server Name

I put this:

.\SQLEXPRESS //which solved my problem

Questions:
Answers:

If sql server is installed on your machine, you should check

Programs -> Microsoft SQL Server 20XX -> Configuration Tools -> SQL Server Configuration Manager -> SQL Server Services
You’ll see “SQL Server (MSSQLSERVER)”

Programs -> Microsoft SQL Server 20XX -> Configuration Tools -> SQL Server Configuration Manager -> SQL Server Network Configuration -> Protocols for MSSQLSERVER -> TCP/IP
Make sure it’s using port number 1433

If you want to see if the port is open and listening try this from your command prompt…
telnet 127.0.0.1 1433

And yes, SQL Express installs use localhost\SQLEXPRESS as the instance name by default.

Questions:
Answers:

by default –

you can also log in to sql express using server name as:

./SQLEXPRESS

or log in to sql server simply as

.

Questions:
Answers:

Similar to what StuartLC was saying, my problem was not resolved until I enabled TCP/IP protocol under SQL Network Configuration>>Protocols for MSSQLSERVER in the SQL Server Configuration Manager dialogue box. After enabling this and a restart, my SSMS connected right away with just the instance name (no ~\MSSQLSERVER).

Leave a Reply

Your email address will not be published. Required fields are marked *