[Oracle Script] check temp tablespace usage

tolilong發表於2017-07-02
select y.name,y.bytes/1024/1024 total_mb,(x.total_blocks*y.block_size)/1024/1024 used_mb,(y.bytes-x.total_blocks*y.block_size)/1024/1024 free_mb,
round((x.total_blocks*y.block_size)/y.bytes,4)*100 pct
from v$sort_segment x,(
select b.name,sum(a.bytes) bytes,a.block_size from v$tempfile a,v$tablespace b
where a.ts#=b.ts# group by b.name,a.block_size) y
where x.tablespace_name=y.name;

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24237320/viewspace-2141489/,如需轉載,請註明出處,否則將追究法律責任。

相關文章