zoukankan      html  css  js  c++  java
  • 查询近一个月的表空间使用情况

    select a.name, b.*
    from v$tablespace a,
    (select tablespace_id,
    trunc(to_date(rtime, 'mm/dd/yyyy hh24:mi:ss')) datetime,
    max(tablespace_usedsize * 8 / 1024 / 1024) USED_G
    from dba_hist_tbspc_space_usage
    where trunc(to_date(rtime, 'mm/dd/yyyy hh24:mi:ss')) >
    trunc(sysdate - 30)
    group by tablespace_id,
    trunc(to_date(rtime, 'mm/dd/yyyy hh24:mi:ss'))
    order by tablespace_id,
    trunc(to_date(rtime, 'mm/dd/yyyy hh24:mi:ss'))) b
    where a.ts# = b.tablespace_id
    and a.NAME = 'AI_DATA'

    select a.name, b.*
    from v$tablespace a,
    (select tablespace_id,
    trunc(to_date(rtime, 'mm/dd/yyyy hh24:mi:ss')) datetime,
    ROUND(max(tablespace_usedsize * 8 / 1024 / 1024), 2) USED_G
    from dba_hist_tbspc_space_usage
    where trunc(to_date(rtime, 'mm/dd/yyyy hh24:mi:ss')) >
    trunc(sysdate - 30)
    group by tablespace_id,
    trunc(to_date(rtime, 'mm/dd/yyyy hh24:mi:ss'))
    order by tablespace_id,
    trunc(to_date(rtime, 'mm/dd/yyyy hh24:mi:ss'))) b
    where a.ts# = b.tablespace_id
    and a.NAME = 'CM_IDX'

  • 相关阅读:
    输出重定向
    echo带颜色输出
    shell学习视频目录
    css盒模型
    jQuery表格模糊搜索
    mysql基础语法3
    mysql基础语法2
    mysql基础语法1
    pyspider框架的使用
    quill富文本框图片上传重写
  • 原文地址:https://www.cnblogs.com/ss-33/p/10579571.html
Copyright © 2011-2022 走看看