v_HS vs v_GS

What is v_HS and v_GS when looking in the SMS/Configuration Manager database ?

First of all they are predefined views and v_HS contains Historical Data from inventory while v_GS contains the actual data from inventory.

So when you would like to compare data for an example if something has changed with the RAM of a computer you use these two.

An example could be Garths sql query on RAM changes.

SELECT Distinct

v_GS_COMPUTER_SYSTEM.Name0 AS ‘PC Name’,

v_GS_X86_PC_MEMORY.TotalPhysicalMemory0 as ‘Current RAM’,

v_HS_X86_PC_MEMORY.TotalPhysicalMemory0 as ‘Past RAM’

FROM

v_GS_COMPUTER_SYSTEM v_GS_COMPUTER_SYSTEM,

v_GS_X86_PC_MEMORY v_GS_X86_PC_MEMORY,

v_HS_X86_PC_MEMORY v_HS_X86_PC_MEMORY

WHERE

v_HS_X86_PC_MEMORY.ResourceID = v_GS_X86_PC_MEMORY.ResourceID

AND v_GS_COMPUTER_SYSTEM.ResourceID = v_GS_X86_PC_MEMORY.ResourceID

AND v_GS_COMPUTER_SYSTEM.ResourceID = v_HS_X86_PC_MEMORY.ResourceID

AND v_HS_X86_PC_MEMORY.TotalPhysicalMemory0 <> v_GS_X86_PC_MEMORY.TotalPhysicalMemory0

WordPress Themes