今天在imp table時發生了表空間不足的問題,使用以下語法可以列出現在表空間的使用狀況。
select a.tablespace_name, a.total || 'm' total_space, (a.total - b.free) || 'm' used_space, to_char((a.total - b.free) / a.total * 100, '99.99') || '%' pct_free
from
(select tablespace_name, sum(bytes) / 1024 / 1024 total from dba_data_files group by tablespace_name) a,
(select tablespace_name, sum(bytes) / 1024 / 1024 free from dba_free_space group by tablespace_name) b
where a.tablespace_name = b.tablespace_name;
from
(select tablespace_name, sum(bytes) / 1024 / 1024 total from dba_data_files group by tablespace_name) a,
(select tablespace_name, sum(bytes) / 1024 / 1024 free from dba_free_space group by tablespace_name) b
where a.tablespace_name = b.tablespace_name;
全站熱搜