The New Home of Oracle-wiki.net
The New Home of Oracle-wiki.net
All things oracle...
All things oracle...
A website for IT Professionals involved with Oracle database.
Show Memory Allocations for Database Sessions.
--
-- Show memory allocations database sessions.
--
SET PAUSE ON
SET PAUSE 'Press Return to Continue'
SET PAGESIZE 60
SET LINESIZE 300
COLUMN username FORMAT A20
COLUMN module FORMAT A50
COLUMN program FORMAT A50
SELECT NVL(a.username,'(oracle)') AS username,
a.module,
a.program,
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
/
Published on
Published 11th Janurary 2026