How to Check Your SQL Server Version: 6 Reliable Methods

The fastest way to check your SQL Server version is to run a T-SQL query using the SERVERPROPERTY function in SQL Server Management Studio. You can also check through SSMS server properties, the command line, the error log, the SQL Server Discovery Report, or Windows Programs and Features.

Knowing your exact version and build number matters more than most people realise. It affects security patch status, software compatibility, Microsoft support eligibility, and migration planning. If you're running SQL Server 2012 or 2014, for example, you're already outside Microsoft's extended support window, which means no security patches and real exposure to known vulnerabilities. When you log a support case with Microsoft, the first thing they'll ask is your exact build number. Without it, you're guessing.

SQL Server has gone through many major releases, from SQL Server 2008 through to SQL Server 2022, each with its own build numbers, service packs, and cumulative updates. Across a multi-instance environment, it's surprisingly easy to lose track of what's actually installed where.

Here are six methods to find your SQL Server version, from the most detailed to the most basic.


Why Does Your SQL Server Version Matter?

Before getting into the how, it's worth being clear on the why.

  • Security patching. Cumulative updates and security patches are version-specific. You can't apply a SQL Server 2019 patch to a 2017 instance. Knowing your exact build tells you whether you're current.
  • Application compatibility. Some applications have minimum or maximum SQL Server version requirements. Deploying a new application without checking can cause immediate failures.
  • Support eligibility. Microsoft's mainstream support for SQL Server 2014 ended in 2019. Extended support ended in 2024. Running an unsupported version means no security fixes.
  • Migration planning. If you're planning a move to SQL Server 2022 or Azure SQL, your current version determines your upgrade path and whether an in-place upgrade is even supported.
  • Troubleshooting. Many known bugs are build-specific. Identifying whether a fix exists for your version is only possible if you know exactly what you're running.

Quick Reference: SQL Server Version Check Methods

Method Tool Required Detail Level Best Used When
SERVERPROPERTY Query SSMS or sqlcmd Full build number and edition Reliable, detailed check
SSMS Server Properties SSMS Version, edition, OS Quick visual check
Command Prompt (sqlcmd) sqlcmd utility Version, edition, OS SSMS not available
SQL Server Error Log File system or SSMS Version at last startup Troubleshooting or no query access
SQL Server Discovery Report SQL Server Installation Center All instances on the machine Auditing multiple instances
Windows Programs and Features Control Panel Major version only Fast but limited

This is the most reliable method and the one we use in practice. Open a query window in SSMS and run the following:

SELECT
    SERVERPROPERTY('ProductVersion')  AS [SQL Server Version],
    SERVERPROPERTY('ProductLevel')    AS [Service Pack / CU],
    SERVERPROPERTY('ProductUpdateLevel') AS [Cumulative Update],
    SERVERPROPERTY('Edition')         AS [Edition],
    SERVERPROPERTY('EngineEdition')   AS [Engine Edition];

This returns the full version string (for example, 15.0.4153.1 for SQL Server 2019 CU12), the service pack or cumulative update level, and the edition. You can cross-reference the build number against Microsoft's official SQL Server builds list to confirm the exact patch level.

The ProductVersion output follows a four-part format: major.minor.build.revision. The major version number maps directly to the SQL Server release year, so 15.x is SQL Server 2019, 14.x is SQL Server 2017, 13.x is SQL Server 2016, and so on back to 10.x for SQL Server 2008.


Method 2: Check SQL Server Properties in SSMS

If you prefer a visual approach, SSMS makes this straightforward.

  1. Connect to your SQL Server instance in Object Explorer.
  2. Right-click the server name and select "Properties".
  3. On the General tab, you'll see the product version, edition, and the underlying operating system version.

This is convenient for a quick check, particularly when you're already in SSMS and don't need the full build string. It won't always show the cumulative update level, so for patch verification, Method 1 is more complete.


Method 3: Use the Command Prompt with sqlcmd

When SSMS isn't installed on the machine you're working from, the sqlcmd utility is your next option. It's available on any machine with SQL Server or the SQL Server command-line tools installed.

Open a Command Prompt and run:

sqlcmd -S servername\instancename -E -Q "SELECT @@VERSION"

Replace servername\instancename with your actual server and instance name. For a default instance, just use the server name. The -E flag uses Windows authentication.

The output will include the full version string, edition, and the Windows version the instance is running on. It's not as structured as the SERVERPROPERTY query, but it gets the job done when you have limited tools available.


Method 4: Read the SQL Server Error Log

SQL Server writes version information to the error log every time the service starts. This is useful when you need to confirm what version was running at a specific point in time, or when you can't connect to the instance directly.

You can access the error log two ways:

  • In SSMS, navigate to Management > SQL Server Logs and open the current log. Look for the first few entries after the most recent startup. The version string will be there.
  • On the file system, navigate to the SQL Server log directory, typically at C:\Program Files\Microsoft SQL Server\MSSQL[version].[instance]\MSSQL\Log\, and open ERRORLOG in a text editor.

The version line appears near the top of the log and looks something like: Microsoft SQL Server 2019 (RTM-CU12) (KB5004524) - 15.0.4153.1 (X64).


Method 5: Use the SQL Server Discovery Report

If you're auditing a server with multiple SQL Server instances, the Discovery Report is the most efficient tool.

  1. Open the SQL Server Installation Center (run setup.exe from your SQL Server installation media, or find it in the Start menu).
  2. Navigate to the "Tools" tab.
  3. Click "Installed SQL Server features discovery report".

This generates an HTML report listing every SQL Server component installed on that machine, including the version and edition of each instance. It's particularly useful during audits or before a migration project.


Method 6: Check Windows Programs and Features

This is the least detailed method but useful for a fast, high-level check.

Open Control Panel, go to Programs and Features, and look for "Microsoft SQL Server" in the list. You'll see the major version (for example, SQL Server 2019) but not the specific build number or cumulative update level.

Use this only when you need a rough answer quickly. For anything involving patching, compatibility, or support, use Method 1.


Key Takeaways

  • The most reliable way to check your SQL Server version is the SERVERPROPERTY T-SQL query, which returns the full build number, cumulative update level, and edition.
  • The ProductVersion major number maps to the release: 15.x is SQL Server 2019, 14.x is 2017, 13.x is 2016, 12.x is 2014, and 11.x is 2012.
  • SQL Server versions older than 2016 are outside Microsoft extended support, meaning no security patches are being released.
  • For auditing multiple instances on a single machine, the SQL Server Discovery Report is the fastest method.
  • Always cross-reference your build number against Microsoft's official SQL Server builds list to confirm your exact cumulative update level.

If you're unsure what versions are running across your environment, or if you've found instances running unsupported builds, DBA Services can help. We conduct SQL Server health checks and version audits for organisations across Australia, giving you a clear picture of your environment and a practical path forward.