需求,查询RMAN备份情况,通过视图进行查询
SQL> select sid,OUTPUT_DEVICE_TYPE,OPERATION,STATUS,object_type,mbytes_processed,START_TIME,END_TIME,round(INPUT_BYTES///,) input_g,
round(OUTPUT_BYTES///,) output_g from v$RMAN_STATUS where start_time>sysdate- order by ; SID OUTPUT_DEVICE_TYP OPERATION STATUS OBJECT_TYPE MBYTES_PROCESSED START_TIME END_TIME INPUT_G OUTPUT_G
---------- ----------------- --------------------------------------------- ------------------------- ------------- ---------------- ------------------- ------------------- ---------- ----------
--存储迁移前
0 SBT_TAPE BACKUP COMPLETED DB INCR 12995801 2019-09-30 15:01:28 2019-10-01 21:57:13 12691.21 12214.13
--存储迁移后
0 SBT_TAPE BACKUP COMPLETED DB INCR 12995801 2019-10-08 21:48:14 2019-10-09 00:51:18 12691.21 12220.65 --需要注意,数据库RMAN BACKUP DATABASE 是DB FULL全备类型,但是需要注意,客户是0级全备,备份类型也是DB INCR
SQL> select sid,OUTPUT_DEVICE_TYPE,OPERATION,STATUS,object_type,mbytes_processed,START_TIME,END_TIME,round(INPUT_BYTES/1024/1024/1024,2) input_g,
2 round(OUTPUT_BYTES/1024/1024/1024,2) output_g from v$RMAN_STATUS where start_time>sysdate-30 and object_type='DB FULL' order by 7;
no rows selected