sys.dm_os_windows_info (Transact-SQL)

 

Updated: November 9, 2016

THIS TOPIC APPLIES TO:yesSQL Server (starting with 2008)noAzure SQL DatabasenoAzure SQL Data Warehouse noParallel Data Warehouse

Returns one row that displays Windows operating system version information.

Only applies to SQL Server running on Windows. To see similar informaton for SQL Server running on a non-Windows host, such as Linux, use sys.dm_os_host_info (Transact-SQL).

Column nameData typeDescription
windows_releasenvarchar(256)For Windows, returns the release number. For a list of values and descriptions, see Operating System Version (Windows). Cannot be NULL.
windows_service_pack_levelnvarchar(256)For Windows, returns the service pack number. Cannot be NULL.
windows_skuintFor Windows, returns the Windows Stock Keeping Unit (SKU) ID. For a list of SKU IDs and descriptions, see GetProductInfo Function. Is NULLable.
os_language_versionintFor 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. Cannot be NULL.

Requires VIEW SERVER STATE permission on the server.

To see informaton for SQL running on a non-Windows host, such as Linux, use sys.dm_os_host_info (Transact-SQL).

The following example returns all columns from the sys.dm_os_windows_info view.

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

Here is a sample result set.

windows_release windows_service_pack_level windows_sku os_language_version

--------------- --------------------------- ------------ -------------------

6.0 Service Pack 2 4 1033

sys.dm_os_sys_info (Transact-SQL)
sys.dm_os_host_info

Community Additions

ADD
Show: