Wednesday 15 November 2017

How much memory my database is using?

This query is instance wise:


select (sga+pga)/1024/1024 as "sga_pga"
from
(select sum(value) sga from v$sga),
(select sum(pga_alloc_mem) pga from v$process)
/


This query is giving the details per each process:

select vs.program, s.sid, sn.name, round( s.value/1024/1024, 2 ) mb
    from v$statname sn, v$sesstat s, v$session vs
   where sn.statistic# = s.statistic#
     and vs.sid = s.sid
     and sn.name = 'session pga memory'
order by 4
/

No comments:

Post a Comment