Oracle查看表空间使用率:
select a.tablespace_name,round(total/1024/1024/1024) "Total g",round(free/1024/1024/1024) "Free g",round((total-free)/total,4)*100 "USED%"
from (select tablespace_name,SUM(bytes) free from dba_free_space group by tablespace_name) a,(select tablespace_name,SUM(bytes) total
from dba_data_files group by tablespace_name) b where a.tablespace_name=b.tablespace_name order by 4;