Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I'm developing an inventory system for RDBMS deployments. I'm starting with SQL Server, and later will be pulling in info for Oracle & other RDBMS deployments. When you query [dm_os_windows_info] there is a numeric value in the windows_sku column that is of use to me.... if I can reconcile it.

 SELECT [windows_sku] FROM [master].[sys].[dm_os_windows_info]

I can't seem to find a simple reference on reconciling this SKU value to the product. If you look at the dm_os_windows_info reference, it says to see the GetProductInfo function. On that page you find a hex value. Looks like if you convert windows_sku to hex and take the right two values it works. If anyone knows of a simpler convert table that would be great. If not I'll probably have to make one. If I have to manually put the data in a table to reference it, I may as well convert it from hex while I do it instead of doing it on the fly.

Also it looks like this view was added in SQL Server 2008 R2, yet you can see version info in server properties for earlier version instances. Where is this stored?

Properties on a 2005 instance

Note I'm trying not to have to jump out to Powershell if possible. Also trying to avoid a dependency on OLE automation being enabled.

Thanks for any help! :)

share|improve this question
1  
Tip: you can run Profiler against SSMS to find how these values are obtained: just remember to remove a default application filter in Profiler so SSMS queries get caught. –  Jon Seigel Jul 6 '12 at 0:10
3  
The colors! My eyes, my eyes!! –  Remus Rusanu Jul 6 '12 at 7:09
    
haha! Reduces eye strain :) –  Eric Higgins Jul 6 '12 at 16:42
add comment

1 Answer

up vote 4 down vote accepted

You can obtain most of the info from your screen shot from xp_msver. It goes back as far as SQL 2005. The other information might be in sys.configurations: http://msdn.microsoft.com/en-us/library/ms188345.aspx

share|improve this answer
    
Cool thanks I knew it was in there somewhere! Seems like there was a table for it but that will work just fine –  Eric Higgins Jul 6 '12 at 0:10
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.