Personal tools
You are here: Home Oracle How To's How to list applications with its memory consumption on ORACLE
Navigation
Log in


Forgot your password?
 
Document Actions

How to list applications with its memory consumption on ORACLE

how many applications are running on oracle database and its memory consumption



The statement below shows all application which are running on oracle database and its memory consumption


set lines 120
set pages 100

COLUMN username FORMAT A20
COLUMN module FORMAT A20
column program format a30

SELECT NVL(a.username,'(oracle)') AS username,
a.module,
a.program,
a.osuser,
Trunc(b.value/1024) AS memory_kb
FROM v$session a,
v$sesstat b,
v$statname c
WHERE a.sid = b.sid
AND b.statistic# = c.statistic#
AND c.name = 'session pga memory'
AND a.program IS NOT NULL
ORDER BY b.value DESC;


If you need to kill some application, the statement  below shows the process SID:


set lines 120
set pages 100
col SID format a11
col osuser format a13
col username format a10
col program format a25
col logon format a20
col status format a9
col spid format A8

select CHR(39)||TO_CHAR(s.sid)||','||TO_CHAR(s.serial#)||CHR(39) SID,s.username, s.osuser, s.status,
s.program, p.spid, to_char(s.logon_time,'DD/MM/YYYY hh24:mi:ss') Logon, s.sql_address
from v$session s,
v$process p
where s.paddr = p.addr
and s.username is not null
order by status, logon;

Security Awareness
Would you like your company to implement gamification into your security awareness program?





Polls