ITPub博客

首页 > 数据库 > Oracle > 看各个表空间占用磁盘情况:

看各个表空间占用磁盘情况:

原创 Oracle 作者:bluelight 时间:2006-12-19 09:24:23 0 删除 编辑
SQL> col tablespace format a20
SQL> select
b.file_id 文件ID号,
b.tablespace_name 表空间名,
b.bytes 字节数,
(b.bytes-sum(nvl(a.bytes,0))) 已使用,
sum(nvl(a.bytes,0)) 剩余空间,
sum(nvl(a.bytes,0))/(b.bytes)*100 剩余百分比
from dba_free_space a,dba_data_files b
where a.file_id=b.file_id
group by b.tablespace_name,b.file_id,b.bytes
order by b.file_id[@more@]SQL> col tablespace format a20
SQL> select
b.file_id 文件ID号,
b.tablespace_name 表空间名,
b.bytes 字节数,
(b.bytes-sum(nvl(a.bytes,0))) 已使用,
sum(nvl(a.bytes,0)) 剩余空间,
sum(nvl(a.bytes,0))/(b.bytes)*100 剩余百分比
from dba_free_space a,dba_data_files b
where a.file_id=b.file_id
group by b.tablespace_name,b.file_id,b.bytes
order by b.file_id

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/1724534/viewspace-884782/ ,如需转载,请注明出处,否则将追究法律责任。

下一篇: 数据库开启监听
请登录后发表评论 登录
全部评论
  • 博文量
    86
  • 访问量
    729152