首页 > Linux操作系统 > Linux操作系统 > 查看表空间的空间使用情况
两个脚本特记录如下,有点意思:
tablespace status
********************
select
b.file_id file_id,
b.tablespace_name,
b.bytes,
b.maxbytes,
(b.bytes-sum(nvl(a.bytes,0))) used,
sum(nvl(a.bytes,0)) unused,
sum(nvl(a.bytes,0))/(b.bytes)*100 percentage
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,b.maxbytes
order by b.file_id;
or
select tablespace_name,sum(bytes)/1024/1024/1024 GB
from dba_data_files group by tablespace_name
union all
select tablespace_name,sum(bytes)/1024/1024/1024 GB
from dba_temp_files group by tablespace_name order by GB;
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/12361284/viewspace-1318/,如需转载,请注明出处,否则将追究法律责任。