Usage of the temp tablespace in Oracle

First find the block size:


select value "BLOCK_SIZE"
from v$parameter
where name='db_block_size' ;

Now check the usage of the tablespace:

select
s.username "USER",s.sid,s.osuser,
u.tablespace "TS" ,
sum(u.blocks) * &BLOCK_SIZE./1024/1024 MB,
x.sql_text
from v$session s,v$sort_usage u,v$sqltext x
where s.saddr=u.session_addr
and s.sql_address=x.address
group by
s.sid, s.username, osuser,
tablespace, sql_text, address, piece
order by sid, piece asc;

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.