Reputation: 51
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.
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.
Upvotes: 0
Views: 1096
Reputation: 31
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.
Upvotes: 1
Reputation: 1815
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 .
Upvotes: 2
Reputation: 1836
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.
Upvotes: 0
Reputation: 16708
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.
Upvotes: 0