top of page

How to Identify Your SQL Server Version and Edition

  • Writer: Jha Chandan
    Jha Chandan
  • Jan 10, 2021
  • 2 min read

There are several ways to determine the version of SQL Server that is installed. This article will go over a few of the most common methods to find the current SQL Server version number and the corresponding service pack (SP) level.

GUI tools Methods:

Method 1: Using SQL Server Management Studio

The SQL Server Management Studio (SSMS) is the integrated environment for managing your SQL Server infrastructure. Management Studio is now a completely standalone product, not tied to any specific version or edition of SQL Server, and no longer requires licensing of any kind.


Option A: Object Explorer

Connect to the server by using Object Explorer in SQL Server Management Studio. When Object Explorer is connected, it shows version information in parentheses.

ree

Option B: Server Properties dialog

ree

Option C: Execute SQL statement

ree

Method 2: Windows Explorer – file properties

Path: C:\Program Files\Microsoft SQL Server\MSSQL14.SQL2017\MSSQL\Binn

File: sqlservr.exe

ree


Method 3: Windows Registry editor

Key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL{MajorVersion}.{InstanceName}\Setup Value: PatchLevel


Example:


SQL Server 2017 (→ major version "14"), instance name "SQL2017"

Key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL14.SQL2017\Setup

ree


Method 4: SQL Server ERRORLOG file

Path: C:\Program Files\Microsoft SQL Server\MSSQL{MajorVersion}.{InstanceName}\MSSQL\Log File: ERRORLOG (without extension)

Example:

SQL Server 2017 (→ major version "14"), instance name "SQL2017"

Path: C:\Program Files\Microsoft SQL Server\MSSQL14.SQL2017\MSSQL\Log

ree

CLI (command line) Methods:

Possible SQL statements:

SELECT @@VERSION;
ree

Typical results:

Microsoft SQL Server 2017 (RTM-CU13-OD) (KB4483666) - 14.0.3049.1 (X64)
Dec 15 2018 11:16:42
Copyright (C) 2017 Microsoft Corporation
Developer Edition (64-bit) on Windows 10 Pro 10.0 <X64> (Build 17763: )
(1 row affected)

Microsoft SQL Server 2019 (RTM-GDR) (KB4517790) - 15.0.2070.41 (X64)
Oct 28 2019 19:56:59
Copyright (C) 2019 Microsoft Corporation
Developer Edition (64-bit) on Windows 10 Pro 10.0 <X64> (Build 17763: )
(1 row affected)

-or-

SELECT SERVERPROPERTY('ProductVersion') AS ProductVersion,
SERVERPROPERTY('ProductLevel') AS ProductLevel, SERVERPROPERTY('Edition') AS Edition, SERVERPROPERTY('ProductUpdateLevel') AS ProductUpdateLevel, SERVERPROPERTY('ProductUpdateReference') AS ProductUpdateReference;

Typical result:


ree

-or-

EXEC sys.xp_msver;

Typical result:

ree

You can also use specific option:

EXEC sys.xp_msver 'ProductVersion';

Typical result:

ree

Method 5: SQLCMD Utility

SQLCMD is a part of the SQL Server Client Tools.


Example:

sqlcmd.exe -S ServerName\InstanceName -E -Q "SELECT @@VERSION"
ree

Method 6: OSQL Utility

OSQL is a part of the SQL Server Client Tools (obsolete but still functional).

Example:

osql.exe -S ServerName\InstanceName -E -Q "SELECT @@VERSION"
ree

Method 7: Windows PowerShell

Example:

# The SQLPS module must be installed
Import-Module SQLPS
Invoke-SqlCmd -ServerInstance ".\SQL2017" -Query "SELECT @@VERSION"
ree

Comments


jc_logo.png

Hi, thanks for stopping by!

Welcome to my “Muse & Learn” blog!
Muse a little, learn a lot.✌️

 

Here you’ll find practical SQL queries, troubleshooting tips with fixes, and step-by-step guidance for common database activities. And of course, don’t forget to pause and muse with us along the way. 🙂
 

I share insights on:​​

  • Db2

  • MySQL

  • SQL Server

  • Linux/UNIX/AIX

  • HTML …and more to come!
     

Whether you’re just starting out or looking to sharpen your DBA skills, there’s something here for you.

Let the posts
come to you.

Thanks for submitting!

  • Instagram
  • Facebook
  • X
2020-2025 © TechWithJC

Subscribe to Our Newsletter

Thanks for submitting!

  • Facebook
  • Instagram
  • X

2020-2025 © TechWithJC

bottom of page