zoukankan      html  css  js  c++  java
  • Oracle表空间使用率脚本

    Oracle表空间使用率脚本

    set linesize 200 
    col tablespace format a15
    col avg format a10
    col max for a10
    col use for a10
    col free for a10
    col max_block for a10
    Select Initcap(f.Tablespace_Name) "tablespace",
           to_char((dSize-fSize)/dSize*100,'990.00')||'%' "avg",
           to_char(dSize,'9,999,990') "max",
           to_char(dSize-fSize,'9,999,990') "use",
           to_char(fSize,'9,999,990') "free",
           to_char(fMax,'9,999,990') "max_block"
      From (Select Tablespace_Name,
                   Round(Sum(Bytes)/1048576,2) fSize,
                   Round(Max(Bytes)/1048576,2) fMax
               From Dba_Free_Space
               Group By Tablespace_Name) f,
           (Select Tablespace_Name,
                   Round(Sum(Bytes)/1048576,2) dSize
              From Dba_Data_Files
              Group By Tablespace_Name) d
    Where d.Tablespace_Name=f.Tablespace_Name order by d.Tablespace_Name
    /
  • 相关阅读:
    枚举类型的应用
    动手动脑
    四则运算和验证码--源码
    ATM源码
    javabean+jsp+servlet+jdbc
    四则运算改良
    Java异常
    课后总结
    包装类Integre
    对象验证
  • 原文地址:https://www.cnblogs.com/godspeed034/p/7404199.html
Copyright © 2011-2022 走看看