0
votes

When trying to connect, I get this error:

TITLE: Connect to Server

Cannot connect to Lalitharam9\SQLEXPRESS.

------------------------------
ADDITIONAL INFORMATION:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (Microsoft SQL Server, Error: -1)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&EvtSrc=MSSQLServer&EvtID=-1&LinkId=20476

My question is:

  1. how to find server name?
  2. how to find instance name?
1

1 Answers

0
votes
  1. Server name is machine's name where SQL Server is installed. If you installed SQL Server on local machine, you can use localhost or .
  2. SQL Server Configuration Manager lists all instances. It's also possible through WMI but is more complex. Click SQL Server Services in the left navigation pane, and check all services starting with 'SQL Server' in the right detail pane. Instance name is the one between ( ). If you see SQL Sever (MSSQLSERVER), it's default instance. You can connect to it by server name. If you see SQL Server (InstanceName), you have to connect to it via ServerName\InstanceName.