夢幻之旅

          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
          主站蜘蛛池模板: 宣城市| 龙川县| 乳山市| 曲水县| 灵川县| 六安市| 乐陵市| 长宁县| 康马县| 望谟县| 巩留县| 都兰县| 广南县| 施甸县| 咸阳市| 株洲市| 阿合奇县| 叶城县| 许昌市| 南通市| 买车| 类乌齐县| 勐海县| 罗山县| 庐江县| 洛隆县| 乐安县| 元谋县| 金寨县| 长武县| 清苑县| 肥东县| 黔西县| 深州市| 万年县| 蓬溪县| 龙州县| 慈利县| 瓮安县| 巴南区| 新龙县|