Home » Check the Memory used by Oracle

Check the Memory used by Oracle

by tuanlp

Check the Memory usage used by Oracle from Operating System

Check the SGA_TARGET and PGA_TARGET size :

SQL> select sum(value)/1024/1024/1024 from v$parameter where name in ('sga_target','pga_aggregate_target');

SUM(VALUE)/1024/1024/1024
-------------------------
                      1.5

If MEMORY_TARGET is used then check the memory usage form that :

select (value)/1024/1024/1024 from v$parameter where name in ('MEMORY_TARGET');

Check from the real stats view:

   select decode( grouping(nm), 1, 'total', nm ) nm, round(sum(val/1024/1024)) mb
   from
   (
   select 'sga' nm, sum(value) val
   from v$sga
   union all
   select 'pga', sum(a.value)
   from v$sesstat a, v$statname b
   where b.name = 'session pga memory'
   and a.statistic# = b.statistic#
   )
  group by rollup(nm);

NM            MB
----- ----------
pga          173
sga         1024
total       1197

You may also like