Show temp tablespace usage

From Tom's notes
Revision as of 14:25, 28 April 2016 by Tom (talk | contribs) (Created page with "SELECT b.tablespace, ROUND(((b.blocks*p.value)/1024/1024),2)||'M' AS temp_size, a.inst_id as Instance, a.sid||','||a.serial# AS sid_serial, NVL(a.u...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

SELECT b.tablespace,

      ROUND(((b.blocks*p.value)/1024/1024),2)||'M' AS temp_size,
      a.inst_id as Instance,
      a.sid||','||a.serial# AS sid_serial,
      NVL(a.username, '(oracle)') AS username,
      a.program,
      a.status,
      a.sql_id

FROM gv$session a,

      gv$sort_usage b,
      gv$parameter p

WHERE p.name = 'db_block_size' AND a.saddr = b.session_addr AND a.inst_id=b.inst_id AND a.inst_id=p.inst_id ORDER BY b.tablespace, b.blocks /