2

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

  • From your image, that's the username since you are using windows authentication instead of SQL authentication, and your server name is the name of your PC – scsimon Jun 27 at 14:41
  • Servername should an be . (a period), localhost, or desktop-6ECNPU1. your instance name of mssqlserver indicates default instance thus not needing to be specified. – Bob Klimes Jun 27 at 15:33
4

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

2

If the old and recently installed versions of SQL are different releases use this code in a SQL query to see what version you are connected to

select @@VERSION

The results for SQL 2017 should look something like this.

Microsoft SQL Server 2017 (RTM-CU14) (KB4484710) - 14.0.3076.1 (X64) Mar 12 2019 19:29:19 ...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.