DBA SGA Memory Allocation

Description
Categories: Enginatics
Repository: Github
Current SGA memory usage in gigabytes, showing the split between buffer cache and shared pool
select
gsi.inst_id,
gsi.name,
decode(gsi.name,'Maximum SGA Size',null,gsi.bytes)/sum(decode(gsi.name,'Maximum SGA Size',null,gsi.bytes)) over (partition by gsi.inst_id)*100 percentage,
gsi.bytes/1000000000 memory_size
from
gv$sgainfo gsi
order by
gsi.inst_id,
gsi.bytes desc