夢幻之旅

          DEBUG - 天道酬勤

             :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
            671 隨筆 :: 6 文章 :: 256 評論 :: 0 Trackbacks
          select dbf.tablespace_name,
          dbf.totalspace “總量(M)”,
          dbf.totalblocks as “總塊數”,
          dfs.freespace “剩余總量(M)”,
          dfs.freeblocks “剩余塊數”,
          (dfs.freespace / dbf.totalspace) * 100 “空閑比例”
          from (select t.tablespace_name,
          sum(t.bytes) / 1024 / 1024 totalspace,
          sum(t.blocks) totalblocks
          from dba_data_files t
          group by t.tablespace_name) dbf,
          (select tt.tablespace_name,
          sum(tt.bytes) / 1024 / 1024 freespace,
          sum(tt.blocks) freeblocks
          from dba_free_space tt
          group by tt.tablespace_name) dfs
          where trim(dbf.tablespace_name) = trim(dfs.tablespace_name)

          select dbf.tablespace_name,
          dbf.totalspace “總量(M)”,
          dbf.totalblocks as “總塊數”,
          dfs.freespace “剩余總量(M)”,
          dfs.freeblocks “剩余塊數”,
          (dfs.freespace / dbf.totalspace) * 100 “空閑比例”
          from (select t.tablespace_name,
          sum(t.bytes) / 1024 / 1024 totalspace,
          sum(t.blocks) totalblocks
          from dba_data_files t
          group by t.tablespace_name) dbf,
          (select tt.tablespace_name,
          sum(tt.bytes) / 1024 / 1024 freespace,
          sum(tt.blocks) freeblocks
          from dba_free_space tt
          group by tt.tablespace_name) dfs
          where trim(dbf.tablespace_name) = trim(dfs.tablespace_name)

          posted on 2011-07-13 00:31 HUIKK 閱讀(265) 評論(0)  編輯  收藏 所屬分類: DataBase
          主站蜘蛛池模板: 林周县| 饶阳县| 松江区| 宽城| 凤山县| 吉林市| 宁陕县| 西昌市| 沙河市| 承德市| 虎林市| 赞皇县| 崇文区| 天祝| 繁峙县| 沙雅县| 育儿| 乐业县| 河北省| 天柱县| 上饶市| 通城县| 临夏县| 双牌县| 池州市| 南部县| 大兴区| 永修县| 盐边县| 漳浦县| 大邑县| 灵台县| 集贤县| 周口市| 靖远县| 祁连县| 科技| 塘沽区| 玉田县| 玉龙| 娱乐|