标签:1024 total name 查看 free tablespace 使用率 ROUND Oracle11g
查询11g表空间使用率:
set linesize 200 pagesize 999
col tablespace_name for a30
col file_name for a65
select name inst_name, b.tablespace_name ,
ROUND(b.total/1024/1024/1024 ,4) total_GB ,
ROUND(b.maxtotal/1024/1024/1024,4) maxtotal_GB,
ROUND(a.free/1024/1024/1024,4) free_GB,
ROUND((b.total-a.free)/1024/1024/1024 ,4) used_GB,
ROUND((b.total-a.free)/b.maxtotal,5)*100 Used_Pct
from
( select tablespace_name,SUM(bytes) free from DBA_FREE_SPACE group by tablespace_name ) a,
(select tablespace_name,SUM(bytes) total,sum( case maxbytes when 0 then bytes else maxbytes end) maxtotal
from dba_data_files group by tablespace_name ) b , v$database
where b.tablespace_name=a.tablespace_name
and b.tablespace_name not like '%UNDO%'
order by Used_Pct desc ;
查询表空间是否自动扩展:
select file_name ,autoextensible ,increment_by from dba_data_files ;
标签:1024,total,name,查看,free,tablespace,使用率,ROUND,Oracle11g 来源: https://www.cnblogs.com/vzhangxk/p/15559683.html
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。