论坛首页 综合技术论坛

Oracle 查看表空间使用情况

浏览 2590 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2014-10-15  
查询当前表空间使用情况
<pre name="code" class="sql">
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
Group By B.Tablespace_Name,B.File_Name,B.Bytes
order by b.tablespace_name;
</pre>
论坛首页 综合技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics