Sql-server – Cannot connect to MSSQL server management studio as localhost

sql serverssms

I installed MSSQL server 2016 with configuration manager and management studio. I trying connect to SQL server via management studio:

  • Server type: Database Engine
  • Server name: localhost
  • Authentication: Windows Authentication

Error TITLE: Connect to Server:

Cannot connect to localhost. 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: Named Pipes Provider, error: 40 – Could not
open a connection to SQL Server) (Microsoft SQL Server, Error: 2) The
system cannot find the file specified

Nothing more information in event viewer. I have these services with states:

  • SQL Server (SQLEXPRESS) – Running
  • SQL Full-text Filter Daemon Launcher (SQLEXPRESS) – Running
  • SQL Server Launchpad (SQLEXPRESS) – Running
  • SQL Server Reporting Services (SQLEXPRESS) – Running
  • SQL Server Agent (SQLEXPRESS) – Stopped
  • SQL Server Browser – Running

After try start SQL Server Agent i get this error:

The SQL Server Agent (SQLEXPRESS) service on Local Computer started
and then stopped. Some services stop automatically if they are not in
use by other services or programs.

Thank you for any advice.

EDIT

I capture a screen of sql services:
enter image description here

Best Answer

I could solve the same issue only with server name (localdb)\MSSQLLocalDB. Just FYI