Skip to content

Latest commit

 

History

History
66 lines (50 loc) · 3.25 KB

sys-dm-os-windows-info-transact-sql.md

File metadata and controls

66 lines (50 loc) · 3.25 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic f1_keywords helpviewer_keywords dev_langs
sys.dm_os_windows_info (Transact-SQL)
The sys.dm_os_windows_info DMV returns one row that displays Windows operating system version information.
rwestMSFT
randolphwest
11/20/2023
sql
system-objects
reference
dm_os_windows_info
dm_os_windows_info_TSQL
sys.dm_os_windows_info
sys.dm_os_windows_info_TSQL
sys.dm_os_windows_info dynamic management view
TSQL

sys.dm_os_windows_info (Transact-SQL)

[!INCLUDE sql-windows-only]

Returns one row that displays Windows operating system version information.

Only applies to [!INCLUDE ssnoversion-md] running on Windows. To see similar information for [!INCLUDE ssnoversion-md] running on a non-Windows host, such as Linux, use sys.dm_os_host_info (Transact-SQL). Behavior on a non-Windows host is undefined.

Column name Data type Description
windows_release nvarchar(256) For Windows, returns the release number. For a list of values and descriptions, see Operating system version (Windows). Can't be NULL.
windows_service_pack_level nvarchar(256) For Windows, returns the service pack number. Can't be NULL.
windows_sku int For Windows, returns the Windows Stock Keeping Unit (SKU) ID. For a list of SKU IDs and descriptions, see GetProductInfo function. Can be NULL.
os_language_version int For Windows, returns the Windows locale identifier (LCID) of the operating system. For a list of LCID values and descriptions, see Locale IDs assigned by Microsoft. Can't be NULL.

Permissions

On [!INCLUDE sssql19-md] and earlier versions, the SELECT permission on sys.dm_os_windows_info is granted to the public role by default. If revoked, you require VIEW SERVER STATE permission on the server.

On [!INCLUDE sssql22-md] and later versions, you require VIEW SERVER PERFORMANCE STATE permission on the server.

Limitations

To see information for [!INCLUDE ssnoversion-md] running on a non-Windows host, such as Linux, use sys.dm_os_host_info (Transact-SQL). Behavior on a non-Windows host is undefined.

Examples

The following example returns all columns from the sys.dm_os_windows_info view, on Windows Server 2019 Standard:

SELECT windows_release,
    windows_service_pack_level,
    windows_sku,
    os_language_version
FROM sys.dm_os_windows_info;

[!INCLUDE ssresult-md]

windows_release windows_service_pack_level windows_sku os_language_version
10.0 7 1033

Related content