亚洲激情专区-91九色丨porny丨老师-久久久久久久女国产乱让韩-国产精品午夜小视频观看

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

oracle中表空間的使用情況腳本

發布時間:2020-07-27 11:53:00 來源:網絡 閱讀:477 作者:ElanAir 欄目:關系型數據庫
  1.        select a.tablespace_name "tbsname", 100-round((nvl(b.bytes_free,0)/a.bytes_alloc)*100,2) "ratio",
           round(a.bytes_alloc/1024/1024,2) "size(M)", round(nvl(b.bytes_free,0)/1024/1024,2) "free(M)",
           round((a.bytes_alloc-nvl(b.bytes_free,0))/1024/1024,2) "usedM)", to_char(sysdate,'yyyy-mm-dd hh34:mi:ss') "get_time"
     from (
           select f.tablespace_name, sum(f.bytes) bytes_alloc, sum(decode(f.autoextensible,'YES',f.maxbytes,'NO',f.bytes)) maxbytes
             from dba_data_files f
            group by tablespace_name) a,
          (select f.tablespace_name, sum(f.bytes) bytes_free
             from dba_free_space f
            group by tablespace_name) b
    where a.tablespace_name = b.tablespace_name
    order by 2;

2.

        SELECT D.TABLESPACE_NAME,SPACE "SUM_SPACE(M)",BLOCKS
SUM_BLOCKS,SPACE-NVL(FREE_SPACE,0) "USED_SPACE(M)",
ROUND((1-NVL(FREE_SPACE,0)/SPACE)*100,2) "USED_RATE(%)",FREE_SPACE
"FREE_SPACE(M)"
FROM
(SELECT TABLESPACE_NAME,ROUND(SUM(BYTES)/(1024*1024),2)
SPACE,SUM(BLOCKS) BLOCKS
FROM DBA_DATA_FILES
GROUP BY TABLESPACE_NAME) D,
(SELECT TABLESPACE_NAME,ROUND(SUM(BYTES)/(1024*1024),2) FREE_SPACE
FROM DBA_FREE_SPACE
GROUP BY TABLESPACE_NAME) F
WHERE D.TABLESPACE_NAME = F.TABLESPACE_NAME(+)
UNION ALL --if have tempfile
SELECT D.TABLESPACE_NAME,SPACE "SUM_SPACE(M)",BLOCKS SUM_BLOCKS,
USED_SPACE "USED_SPACE(M)",ROUND(NVL(USED_SPACE,0)/SPACE*100,2)
"USED_RATE(%)",
NVL(FREE_SPACE,0) "FREE_SPACE(M)"
FROM
(SELECT TABLESPACE_NAME,ROUND(SUM(BYTES)/(1024*1024),2)
SPACE,SUM(BLOCKS) BLOCKS
FROM DBA_TEMP_FILES
GROUP BY TABLESPACE_NAME) D,
(SELECT TABLESPACE_NAME,ROUND(SUM(BYTES_USED)/(1024*1024),2)
USED_SPACE,
ROUND(SUM(BYTES_FREE)/(1024*1024),2) FREE_SPACE
FROM V$TEMP_SPACE_HEADER
GROUP BY TABLESPACE_NAME) F
WHERE D.TABLESPACE_NAME = F.TABLESPACE_NAME(+)

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

义马市| 阳山县| 扎鲁特旗| 云梦县| 滕州市| 闽侯县| 蚌埠市| 新营市| 勐海县| 济南市| 阿瓦提县| 石嘴山市| 舞阳县| 自贡市| 盐池县| 南靖县| 新兴县| 镇原县| 精河县| 屯门区| 崇文区| 额敏县| 麻阳| 历史| 曲麻莱县| 娱乐| 昭通市| 德格县| 宁化县| 徐水县| 绿春县| 平潭县| 康马县| 建瓯市| 观塘区| 内黄县| 赣州市| 鄯善县| 昌乐县| 多伦县| 青河县|