每个表都在自己的表空间中,所以我们可以很容易地查询数据字典,来查看每个表空间中已分配的空间和空闲空间:
select b.tablespace_name,
mbytes_alloc,
mbytes_free
from ( select round(sum(bytes)/1024/1024) mbytes_free,
tablespace_name
from DBA_free_space
group by tablespace_name ) a,
( select round(sum(bytes)/1024/1024) mbytes_alloc,
tablespace_name
from dba_data_files
group by tablespace_name ) b
where a.tablespace_name (+) = b.tablespace_name
and b.tablespace_name in ('BIG1','BIG2');
TABLESPACE MBYTES_ALLOC MBYTES_FREE
---------- ------------ -----------
BIG1 1496 344
BIG2 1496 344
|
|