oracle 表空间使用率查看
查询11g表空间使用率:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
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 ; |
查询表空间是否自动扩展:
1 |
select file_name ,autoextensible ,increment_by from dba_data_files ; |
分类: oracle