需求,查询RMAN备份情况,通过视图进行查询
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 order by 7; SID OUTPUT_DEVICE_TYP OPERATION STATUS OBJECT_TYPE MBYTES_PROCESSED START_TIME END_TIME INPUT_G OUTPUT_G ---------- ----------------- --------------------------------------------- ------------------------- ------------- ---------------- ------------------- ------------------- ---------- ----------
0 SBT_TAPE CONTROL FILE AND SPFILE AUTOBACK COMPLETED 57 2019-10-01 21:56:41 2019-10-01 21:57:07 .06 .06
0 RMAN COMPLETED WITH ERRORS 12995858 2019-10-01 22:07:18 2019-10-03 05:21:04 12691.27 12215.99
0 SBT_TAPE BACKU COMPLETED DB INCR 12995801 2019-10-01 22:07:22 2019-10-03 05:21:04 12691.21 12215.93
数据库近一月无数据库全备,需要检查
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