【sql】oracle运维之rman备份情况统计

来源:互联网 发布:php iis配置 编辑:程序博客网 时间:2024/06/06 08:43
------查看备份量
select to_char(start_time, 'yyyymmdd'),
       round(sum(a.output_bytes) / 1024 / 1024 / 1024, 2) gb
  from v$rman_status a
 where a.start_time between trunc(sysdate - 16) and trunc(sysdate)
 group by to_char(start_time, 'yyyymmdd')
 order by to_char(start_time, 'yyyymmdd')
 
 
 
 ------每日归档量
select to_char(first_time, 'yyyymmdd'),
       round(sum(blocks * block_size / 1024 / 1024 / 1024), 2) as gb
  from v$archived_log
 where first_time between trunc(sysdate - 8) and trunc(sysdate)
 group by to_char(first_time, 'yyyymmdd') order by to_char(first_time, 'yyyymmdd')


 
 -----asm空间量
select name, round(free_mb / 1024, 2) gb from v$asm_diskgroup where name = 'BAK'
原创粉丝点击