Sql-server – Connecting to SQL Server with SQL Server Management Studio

sql serverssms

I've just install SQL Server 2017, it showed this window:

enter image description here

When I open SQL Server Management Studio it has default Server Name as DESKTOP-6ECNPU1\matt which is the SQL Administrator value of the server. I'm confused because I thought the value that would be needed is the Instance Name MSSQLSERVER. I have connected to the database but I'm not sure if it's the right one, DESKTOP-6ECNPU1\matt could be a previously installed SQL Server that came with Visual Studio. So my question, have I connected to the SQL Server I just installed?

enter image description here

Best Answer

The default server name from your screenshot is showing DESKTOP-6ECNPU1, not DESKTOP-6ECNPU1\matt, the latter is the user you are connecting into sql server with.

The sql server browser service is used to route the connection to the appropriate instance on the server. The default sql server instance is installed on port 1433. If you were to connect to a named instance, then the name will be translated to the port that the instance is running on, otherwise if only the machine name is specified you get routed to the default instance.

Based on your screenshot that installation is the default instance (because instance name is MSSQLSERVER), so if you only specify the name of the machine, you will be connecting to that 2017 sql server instance you installed.

If you want to double check even further, see James answer and run that command, also see @@servicename