查看表空间使用情况

  1 使用dba账号在plsql developer上登录
  2 使用命令查询:

select a.tablespace_name tablespace_name
,nvl(ceil((1 - b.free / a.total) * 100), 100) "usage_of_tablespace%"
,nvl(b.free, 0) "left_space(M)"
,c.extent_management "Extent_management"
from (select tablespace_name, sum(nvl(bytes, 0)) / 1024 / 1024 total
from dba_data_files
group by tablespace_name) a
,(select tablespace_name, sum(nvl(bytes, 0)) / 1024 / 1024 free
from dba_free_space
group by tablespace_name) b
,dba_tablespaces c
where a.tablespace_name = c.tablespace_name
and c.tablespace_name = b.tablespace_name(+);


3 结果:


posted @ 2017-12-05 14:02  人间值得  阅读(507)  评论(0编辑  收藏  举报