查看表空间(oracle)占用情况
程序员文章站
2022-07-05 08:35:51
...
select total.tablespace_name,round(total.MB,2) as Total_MB, round(total.MB-free.MB, 2) as Used_MB from (select tablespace_name, sum(bytes)/1024/1024 as MB from dba_free_space group by tablespace_name) free, (select tablespace_name, sum(bytes)/1024/1024 as MB from dba_data_files group by tablespace_name) total where free.tablespace_name=total.tablespace_name