Share via


SQL Query to get RAM information for desktops and laptops in SCCM 2012

I am writing this article as I faced few difficulties searching for correct query. All I got is wrong table information or old SCCM 2007 tables. I hope this would help few people who are looking for this kind of query.

This query fetches the data of RAM(Physical memory) which all machines that is Laptops and Desktops in your system would have.

the main view which we are using here is v_gs_physical_memory and the query is given below:



select v_R_System.Name0, BankLabel0 as MemoryBankLabel, Capacity0/1024 as RAM, v_GS_PHYSICAL_MEMORY.Caption0, SystemType0  from v_R_System join v_GS_SYSTEM_ENCLOSURE on v_R_System.ResourceID=v_GS_SYSTEM_ENCLOSURE.ResourceID<br>
join v_GS_PHYSICAL_MEMORY on v_R_System.ResourceID=v_GS_PHYSICAL_MEMORY.ResourceID<br>
join v_CH_ClientSummary on v_R_System.ResourceID=v_CH_ClientSummary.ResourceID<br>
join v_GS_SYSTEM on v_GS_SYSTEM.ResourceID=v_R_System.ResourceID<br>
where ChassisTypes0 in ('3', '4', '5', '6', '7', '15', '16', '8' , '9', '10', '11', '12', '14', '18', '21') order by v_R_System.Name0