查询表空间利用率

查询表空间利用率:

select a.tablespace_name, total, free, total-free as used, substr(free/total * 100, 1, 5) as “free%”,

substr((total – free)/total * 100, 1, 5) as “used%” from
(select tablespace_name, case when t.autoextensible=’yes’ then sum(maxbytes)/1024/1024 else
sum(bytes)/1024/1024 end as total from dba_data_files t group by tablespace_name,autoextensible) a,
(select tablespace_name, sum(bytes)/1024/1024 as free from dba_free_space group by tablespace_name) b
where a.tablespace_name = b.tablespace_name order by a.tablespace_name

查询结果

 

(0)
上一篇 2022年3月22日
下一篇 2022年3月22日

相关推荐