
How to Check Your SQL Server Version and Build
Connect to the Database Engine and run SELECT SERVERPROPERTY('ProductVersion'); to get its full build number. To check the edition, cumulative update (CU), and KB at the same time, use the query below.
T-SQL query for the SQL Server build, edition, CU and KB
Run this read-only query in SSMS, VS Code, or another SQL client. Any database on the target instance will do. For an availability group, connect to each replica directly if you need the patch level of every node.
SELECT
CONVERT(nvarchar(128), SERVERPROPERTY('ServerName')) AS server_name,
CONVERT(nvarchar(128), SERVERPROPERTY('ProductVersion')) AS engine_build,
CONVERT(nvarchar(128), SERVERPROPERTY('ProductLevel')) AS product_level,
CONVERT(nvarchar(128), SERVERPROPERTY('ProductUpdateLevel')) AS cu,
CONVERT(nvarchar(128), SERVERPROPERTY('ProductUpdateReference')) AS update_kb,
CONVERT(nvarchar(128), SERVERPROPERTY('Edition')) AS edition;| Result column | What it tells you |
|---|---|
engine_build | Full engine version. Use all four parts to match a modern build. |
product_level | Original release (RTM) or a service pack such as SP3. |
cu and update_kb | Update level and KB, where reported. Either can return NULL. |
edition | Installed Database Engine edition, such as Standard or Developer. |
A patched instance can still report RTM in product_level. That column describes the servicing baseline. Use engine_build to identify the actual patch.
Look up a SQL Server build number or KB
For example, 16.0.4135.4 is SQL Server 2022 CU14, introduced in KB5038325. For patch planning, match the full build, operating system, and servicing branch.
This build history covers installed SQL Server instances, including SQL Server on a virtual machine. Azure SQL Database and Azure SQL Managed Instance use their own versioning.
Check the connected SQL Server version in SSMS
- Connect to the Database Engine in Object Explorer.
- Right-click the server name and select Properties.
- On the General page, read the Product and Version fields.
In a query window, SELECT @@VERSION; returns the engine build and environment details in a single line of output. It also works on very old SQL Server releases. For the Management Studio client version, use Help → About.
SSMS release historyDatabase compatibility levelsDownload build dataMicrosoft’s engine version guideMicrosoft SERVERPROPERTY reference
