Note: Technical Talk being moved to:

Tuesday, 5 May 2009

Temp Tablespace Usage

A useful script to check on users/processes using up temp tablespace.
SELECT distinct s.username
     , s.sid
     , s.serial#
     , s.osuser
     , u.tablespace
     , u.contents
     , u.segtype
     , u.extents
     , u.blocks
  FROM v$session s
     , v$sort_usage u
 WHERE s.saddr=u.session_addr
order by s.username, s.osuser;

Note: blocks * size of blocks = mbytes

No comments: