重庆思庄Oracle、Redhat认证学习论坛

标题: 查看每天RMAN备份大小 [打印本页]

作者: jiawang    时间: 2023-4-11 10:31
标题: 查看每天RMAN备份大小
本帖最后由 jiawang 于 2023-4-11 10:31 编辑

通过动态性能视图v$backup_set_details或v$backup_piece都可以查询RMAN每天的备份大小信息:

查询v$backup_set_details

    select
    to_char(start_time,'yyyy-mm-dd') start_time,
    to_char(start_time,'day') day,
    round(sum(OUTPUT_BYTES)/1024/1024/1024,2) SIZE_GB
    from v$backup_set_details
    group by to_char(start_time,'yyyy-mm-dd'),to_char(start_time,'day')
    order by start_time desc;


查询v$backup_piece

    select
    to_char(start_time,'yyyy-mm-dd') start_time,
    to_char(start_time,'day') day,
    round(sum(BYTES)/1024/1024/1024,2) SIZE_GB
    from v$backup_piece where handle is not null
    group by to_char(start_time,'yyyy-mm-dd'),to_char(start_time,'day')
    order by start_time asc;








欢迎光临 重庆思庄Oracle、Redhat认证学习论坛 (http://bbs.cqsztech.com/) Powered by Discuz! X3.2