大网数据广告活动
数据库与应用安全

Find the Version and Edition of Your SQL Server Database Engine

· 52CE 我爱测

Learn how to find the version and edition of your SQL Server Database Engine using methods like SSMS, error logs, T-SQL queries, and more.

Determine which version and edition of SQL Server Database Engine is running

Original product version:   SQL Server
Original KB number:   321185

Summary

Knowing your SQL Server Database Engine version and edition is essential for troubleshooting, planning upgrades, and ensuring compatibility with other components. This article explains several methods to find this information, including SQL Server Management Studio (SSMS), error log files, T-SQL queries, and the SQL Server Installation Center.

Note: The version information follows the major.minor.build.revision pattern. The revision information typically isn't used when you check the SQL Server version.

Choose your method to determine version and edition

Method Best for Requirements
Object Explorer (SSMS) Quick visual check SSMS installed, server connection
Errorlog file No connection needed File system access
SELECT @@VERSION Scripting and automation Query access
SERVERPROPERTY Individual property values Query access
Discovery report All instances on system Local access only

Use Object Explorer in SQL Server Management Studio

Connect to the server by using Object Explorer in SQL Server Management Studio (SSMS). After you connect, the version information appears in parentheses, along with the username that you used to connect to the specific instance of SQL Server.

To learn how to connect to SQL Server by using Object Explorer, see Connect to a SQL Server or Azure SQL Database.

View the Errorlog file

Check the first few lines of the Errorlog file for that instance. By default, the error log is located at Program Files\Microsoft SQL Server\MSSQL.n\MSSQL\LOG\ERRORLOG in ERRORLOG.n files. The entries might resemble the following example:

2024-09-05 16:56:22.35 Server      Microsoft SQL Server 2022 (RTM-CU14) (KB5038325) - 16.0.4135.4 (X64)  
Jul 10 2024 14:09:09  
Copyright (C) 2022 Microsoft Corporation 
Developer Edition (64-bit) on Windows 11 Enterprise 10.0 <X64> (Build 22631: ) (Hypervisor)

This entry provides product information like version, product level, 64-bit versus 32-bit architecture, the SQL Server edition, and the operating system version that SQL Server runs on.

Run the SELECT @@VERSION query

Connect to the instance of SQL Server, and then run the following query:

SELECT @@VERSION

The following example shows the output of this query:

Microsoft SQL Server 2022 (RTM-CU14) (KB5038325) - 16.0.4135.4 (X64)   Jul 10 2024 14:09:09   Copyright (C) 2022 Microsoft Corporation  Developer Edition (64-bit) on Windows 11 Enterprise 10.0 <X64> (Build 22631: ) (Hypervisor) 

From the output, you can identify the SQL Server product version, service pack level, cumulative update level, or security update level (if applicable). For more information, see Latest updates and version history for SQL Server.

Use the SERVERPROPERTY function

Connect to the instance of SQL Server, and then run the following query in SSMS:

SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY('productlevel'), SERVERPROPERTY('edition')

This query returns the following results:

  • The product version (for example, 16.0.4135.4)
  • The product level (for example, RTM)
  • The edition (for example, Developer)

For example, the results might look like this:

Product version Product level Edition
16.0.4135.4 RTM Developer Edition (64-bit)

Note:

Use the Installed SQL Server features discovery report

Find the Installed SQL Server features discovery report on the Tools page of the SQL Server Installation Center. This report provides information about all the SQL Server instances installed on the system, including client tools like SSMS. This tool runs locally only on the system where SQL Server is installed. It can't get information about remote servers.

For more information, see Validate a SQL Server Installation.

The following image shows a sample report:

Related content

Source: Microsoft Learn / IT Pro troubleshooting by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / IT Pro troubleshooting
适用范围
See source applicability · Source date 01/21/2026
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。