0

I use SQL Server Management Studio. I want to connect the local server. But, I am missing the local server name.

I entered local, localhost and ., but it couldn't connect.

How can I get the local server name in SQL Server Management Studio?

Please let me know which path you can check.

enter image description here

A network related or installer-related error occurred while establishing a connection to SQL Server. The server can not be found or inaccessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections.

enter image description here

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Sun Young Lee
  • 51
  • 1
  • 5
  • Can you add in the error message that appears when you try to connect? – Dan J Oct 26 '17 at 01:12
  • 1
    To connect to localhost it needs to be installed and running locally. First confirm that it is installed and running by going to the services applet and seeing if there is a running SQL Server service in there. Also check whether all the server side tools are installed (such as surface area configuration). These things are different per version so please post the actual version that you think is installed – Nick.Mc Oct 26 '17 at 03:26
  • To get to the local default instance (unnamed instance), you use `.` or `(local)` (including **parenthesis**!), or your PC's `machinename` - if that doesn't work, then you don't have an unnamed instance installed locally – marc_s Oct 26 '17 at 04:47

4 Answers4

2

Other way to find is , drop down the server name box, at the end there is an option called . click it and there database engine , expand the database engine and u ll find the list of sql servers in your pc/network. Click the required one and u ll get servername .enter image description here

Ranjana Ghimire
  • 1,785
  • 1
  • 12
  • 20
1

Just write SELECT @@servername and run in your SQL Server Management Studio.

It will return the name of the current servername you are connected with.

ℛɑƒæĿᴿᴹᴿ
  • 4,983
  • 4
  • 38
  • 58
0

The alias (local) (yes, including the parentheses) should allow you to connect to your local instance, but please supply the actual error that's occurring, in case the hostname isn't the actual problem.

Dan J
  • 16,319
  • 7
  • 50
  • 82
0

From your question I assume that you're logged on to the machine that is running SQL Server. If so you can open SQL Server Configuration Manager to confirm the name of your SQL Instance. SQL Server Configuration Manager shows all of the SQL Services Running. Look for the one called SQL Server (instanceName) and note the instance name. You can then access the server from SQL Server Management Studio using either (local)\instanceName, .\instanceName, or servername\instanceName.

Greg the Incredulous
  • 1,676
  • 4
  • 29
  • 42