日期:2014-05-17 浏览次数:21091 次
SELECT total.tablespace_name, total_size/1024/1024, nvl(free_size, 0)/1024/1024, ROUND((total_size - nvl(free_size, 0)) / total_size, 4)*100 usage FROM (SELECT tablespace_name, SUM(bytes) total_size FROM DBA_DATA_FILES GROUP BY tablespace_name) total left outer join (SELECT tablespace_name, SUM(bytes) free_size FROM DBA_FREE_SPACE GROUP BY tablespace_name) free on total.tablespace_name = free.tablespace_name ORDER BY usage DESC;