导航
导航

临时表空间相关问题

查询临时表空间sql:

1
2
3
4
Select se.username,se.sid,su.extents,su.blocks*to_number(rtrim(p.value))as    Space,tablespace,segtype,sql_text
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
order by se.username,se.sid

或是:

1
2
3
Select su.username,su.Extents,tablespace,segtype,sql_text
from v$sort_usage su,v$sql s
Where su.SQL_ID = s.SQL_ID

参考:
http://blog.itpub.net/30036720/viewspace-2121272/
http://www.cnblogs.com/kerrycode/p/4006840.html