Saturday, September 18, 2010

How to find out sessionwise memory usage?

set lines 132 pages 2000
column PROGRAM format a15
column NAME format a15
column TERMINAL format a15
column OSUSER format a15
SELECT   v$session.sid, v$session.serial#, osuser, terminal,program, v$sysstat.NAME,
round(V$sesstat.VALUE / 1024/1024 ) as "MB Memory"
    FROM v$session, V$SESSTAT, V$SYSSTAT
   WHERE v$sesstat.SID = v$session.SID
     AND v$sysstat.STATISTIC# = v$sesstat.STATISTIC#
     AND v$sysstat.NAME LIKE '%ga %'
     AND round(V$sesstat.VALUE/1024/1024) > 20
ORDER BY v$sesstat.VALUE, osuser;

No comments:

Post a Comment