我用的查询表空间使用率的语句如下:
select a.tablespace_name,a.bytes/1024/1024 "Sum MB",(a.bytes-b.bytes)/1024/1024 "used MB",b.bytes/1024/1024 "free MB",
round(((a.bytes-b.bytes)/a.bytes)*100,2) "percent_used"
from
(select tablespace_name,sum(bytes) bytes from dba_data_files group by tablespace_name) a,
(select tablespace_name,sum(bytes) bytes,max(bytes) largest from dba_free_space group by tablespace_name) b
where a.tablespace_name=b.tablespace_name
order by ((a.bytes-b.bytes)/a.bytes) desc;
更加详细的过程请见附件
不知是不是oracle 10g引入了新的机制还是其他什么原因引起的,论坛里有人遇到过这种情况吗?求教。
扩展表空间的数据文件之后警告日志里会有记录但是表空间的使用率不会立刻改变.doc
(2010-08-16 12:39:12, Size: 287 KB, Downloads: 3)