日期:2023-08-29
一般是查Interlib用户数据库的表空间剩余大小,其他系统表空间都是自动扩展的,命令如下:
----------------------------------------
select a.tablespace_name, round(a.total_size) "total_size(MB)",
round(a.total_size)-round(b.free_size,3) "used_size(MB)",
round(b.free_size,3) "free_size(MB)", round(b.free_size/total_size*100,2)||'%' free_rate
from ( select tablespace_name, sum(bytes)/1024/1024 total_size
from dba_data_files
group by tablespace_name ) a,
( select tablespace_name, sum(bytes)/1024/1024 free_size
from dba_free_space
group by tablespace_name ) b
where a.tablespace_name = b.tablespace_name(+) and a.tablespace_name='INTERLIB';