您的位置:首页 > 其它

查看rman备份进度

2011-12-30 10:47 225 查看
来自Gavin Soorma's blog

set lines 80

set pages 250

ttitle “Daily Backup……..”

select DB NAME,dbid,

NVL(TO_CHAR(max(backuptype_db),’DD/MM/YYYY HH24:MI’),’01/01/0001:00:00′) DBBKP,

NVL(TO_CHAR(max(backuptype_arch),’DD/MM/YYYY HH24:MI’),’01/01/0001:00:00′) ARCBKP

from (

select a.name DB,dbid,

decode(b.bck_type,’D’,max b.completion_time),’I’,

max b.completion_time)) BACKUPTYPE_db,

decode(b.bck_type,’L’,

max b.completion_time)) BACKUPTYPE_arch

from rc_database a,bs b

where a.db_key=b.db_key

and b.bck_type is not null

and b.bs_key not in(Select bs_key from rc_backup_controlfile

where AUTOBACKUP_DATE is not null or AUTOBACKUP_SEQUENCE is not null)

and b.bs_key not in(select bs_key from rc_backup_spfile)

group by a.name,dbid,b.bck_type

) group by db,dbid

ORDER BY least(to_date(DBBKP,’DD/MM/YYYY HH24:MI’),

to_date(ARCBKP,’DD/MM/YYYY HH24:MI’));
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: