I am used to exploring what is available in the technology of love – SQL Server. As I was exploring into one of the simplest set of DMVs which have been available for ages. There are several ways to get the OS information inside SQL Server. One of the ways is to use the DMV as shown below.
SELECT * FROM sys.dm_os_windows_info
The other way to know the OS related information about SQL Server is to scan your Error Logs. During startup, SQL Server logs all this information which is a wealth of information. A sample output is shown below:
Microsoft SQL Server 2016 (SP1) (KB3182545) – 13.0.4001.0 (X64)
Oct 28 2016 18:17:30
Copyright (c) Microsoft Corporation
Developer Edition (64-bit) on Windows 10 Enterprise 6.3 <X64>
When I started to write about this blog is when I realized will it also work similar on SQL vNext. To my surprise, there has been a new DMV that is getting added for Linux in mind. The “windows” term is getting removed and it made a lot of sense.
SELECT * FROM sys.dm_os_host_info
If you installed the vNext version then this DMV will work. On a side note, I am interested in knowing how many of you have installed the CTP of SQL Server on Linux? What has been your experience? Let me know.
Reference: Pinal Dave (https://blog.sqlauthority.com)