Reputation: 880
I am putting together a table with server names and their properties such as Number of CPUs, Cores, memory, OS version, etc. I am trying to find an easy way to get the windows OS version number in SSMS. Does anyone know of a query that I can use to return the Windows OS version in SSMS.
Upvotes: 3
Views: 2775
Reputation: 1
You can get de OS distribution with this statement:
SELECT host_platform, host_distribution, host_release, host_service_pack_level, host_sku, os_language_version FROM sys.dm_os_host_info;
Upvotes: 0
Reputation: 77846
You can use @@VERSION
global variable like below which should give you SQL Server version along with underlying OS version
SELECT @@VERSION
You will get a result like
...... on Windows NT 6.1 (Build 7601: Service Pack 1)
Upvotes: 4
Reputation: 310983
This information should be available in the sys.dm_os_windows_info
table:
SELECT windows_release
FROM sys.dm_os_windows_info;
Upvotes: 5