Reports 2017-11-18T12:27:27+00:00

DBA Memory Configuration (SGA+PGA)

Description
Categories: DBA, Enginatics
Shows current memory configuration

select
x.name,
round(x.value/1024/1024/1024,2) value,
round((max(decode(x.name,'physical_memory',x.value)) over ()-max(decode(x.name,'sga_target',x.value)) over ()-max(decode(x.name,'pga_aggregate_target',x.value)) over ())/1024/1024/1024,2)  unused_ram
from
(
select 'physical_memory' name, vo.value from v$osstat vo where vo.stat_name='PHYSICAL_MEMORY_BYTES' union all
select vp.name, to_number(vp.value) value from v$parameter vp where vp.name in ('pga_aggregate_target','sga_max_size','sga_target','memory_max_target','memory_target')
) x