oracle如何查询表空间信息

来源:互联网 发布:green网络加速器下载 编辑:程序博客网 时间:2024/05/03 02:53

select
b.
file_name 物理文件名,
b.tablespace_name 表空间,
b.bytes
/1024/1024 大小M,
(b.bytes
-sum(nvl(a.bytes,0)))/1024/1024  已使用M,
substr((b.bytes
-sum(nvl(a.bytes,0)))/(b.bytes)*100,1,5)  利用率
from dba_free_space a,dba_data_files b
where a.file_id=b.file_id
groupby b.tablespace_name,b.file_name,b.bytes
orderby b.tablespace_name
0 0