Temp tablespace usage per user
==============================
select s.username "USER",s.osuser, u.tablespace "TS" , sum(u.blocks) * &BLOCK_SIZE./1024/1024/1024 GB
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.username, s.osuser, u.tablespace
Undo Usage
==========
select a.TABLESPACE_NAME, a.MAX, b.USED, round((b.USED/a.MAX)*100,2) PCT
from(select TABLESPACE_NAME, (sum(decode(MAXBYTES,0,USER_BYTES,MAXBYTES))/1024/1024/1024) MAX from dba_data_files group by TABLESPACE_NAME) a,
(select tablespace_name, sum(bytes)/1024/1024/1024 USED from dba_undo_extents group by tablespace_name) b
where a.TABLESPACE_NAME=b.TABLESPACE_NAME and b.USED > a.MAX *(80/100);
Showing posts with label Temp and Undo Usage. Show all posts
Showing posts with label Temp and Undo Usage. Show all posts
Thursday, June 05, 2008
Temp tablespace usage per user
Posted by
oracledba
at
4:36 PM
0
comments
Labels: Temp and Undo Usage
Subscribe to:
Posts (Atom)