标签:临时表空间
with pct as(SELECT TABLESPACE_NAME AS TABLESPACE_NAME,
----BYTES/1024/1024/1024 AS "FILE_SIZE",
round(100*(USER_BYTES/1024/1024)/DECODE(MAXBYTES, 0, BYTES/1024/1024,MAXBYTES/1024/1024),3) as percent
FROM DBA_TEMP_FILES
)
select * from pct
right join
(Select se.username,
se.machine,
se.program,
se.sid,
su.extents,
su.blocks*to_number(rtrim(p.value))/1024/1024 as Space,
tablespace,
segtype,
sql_text,
to_char(s.LAST_ACTIVE_TIME, 'yyyy-mm-dd hh24:mi:ss') "EXCUTION_TIME"
from v$sort_usage su,
v$parameter p,
v$session se,
v$sql s
where p.name='db_block_size' and su.session_addr=se.saddr and s.hash_value=su.sqlhash and s.address=su.sqladdr
and se.username is not null
order by se.username,se.sid) lst
on pct.TABLESPACE_NAME=lst.TABLESPACE
标签:临时表空间
原文地址:http://blog.51cto.com/11310506/2125186