Oracle查看RMAN备份情况

Oracle查看RMAN备份情况

查看近两天的备份情况

set linesize 180 pagesize 200
col inc_lev for 9999
col device_type for a8
col bs_key for 99999
col elap_MIN FOR 999999
SELECT bs.recid bs_key
  , DECODE(backup_type, 'L', 'Archived Redo Logs', 'D', 'Datafile Full Backup', 'I', 'Incremental Backup') backup_type
  ,  device_type  
  ,  DECODE(bs.controlfile_included, 'NO', '-', bs.controlfile_included)    controlfile_included
  , bs.incremental_level inc_lev ,  bs.start_time, bs.completion_time, bs.elapsed_seconds/60   elap_MIN                                                                                        
FROM
    v$backup_set    bs
  , (select distinct set_stamp, set_count, tag, device_type
     from v$backup_piece
     where status in ('A', 'X'))           bp
WHERE bs.start_time>sysdate-2 
  AND bs.set_stamp = bp.set_stamp
  AND bs.set_count = bp.set_count
ORDER BY bs.recid;

BS_KEY BACKUP_TYPE          DEVICE_T CON INC_LEV START_TIME   COMPLETION_T ELAP_MIN
------ -------------------- -------- --- ------- ------------ ------------ --------
 61758 Incremental Backup   DISK     -         1 03-DEC-21    03-DEC-21           0
 61759 Datafile Full Backup DISK     YES         03-DEC-21    03-DEC-21           0
 61760 Datafile Full Backup DISK     YES         03-DEC-21    03-DEC-21           0
 61761 Datafile Full Backup DISK     YES         03-DEC-21    03-DEC-21           0
 61762 Incremental Backup   DISK     -         1 03-DEC-21    03-DEC-21           0
 61763 Datafile Full Backup DISK     YES         03-DEC-21    03-DEC-21           0
 61764 Datafile Full Backup DISK     YES         03-DEC-21    03-DEC-21           0
 61765 Datafile Full Backup DISK     YES         03-DEC-21    03-DEC-21           0
 61766 Incremental Backup   DISK     -         1 03-DEC-21    03-DEC-21           0
 61767 Datafile Full Backup DISK     YES         03-DEC-21    03-DEC-21           0
 61768 Datafile Full Backup DISK     YES         03-DEC-21    03-DEC-21           0
 61769 Datafile Full Backup DISK     YES         03-DEC-21    03-DEC-21           0
 61770 Incremental Backup   DISK     -         1 03-DEC-21    03-DEC-21           8
 61771 Datafile Full Backup DISK     YES         03-DEC-21    03-DEC-21           0
 61772 Datafile Full Backup DISK     YES         03-DEC-21    03-DEC-21           0
 61773 Datafile Full Backup DISK     YES         03-DEC-21    03-DEC-21           0
 61774 Incremental Backup   DISK     -         1 03-DEC-21    03-DEC-21           0
 61775 Datafile Full Backup DISK     YES         03-DEC-21    03-DEC-21           0
 61776 Datafile Full Backup DISK     YES         03-DEC-21    03-DEC-21           0
 61777 Datafile Full Backup DISK     YES         03-DEC-21    03-DEC-21           0


查看备份详细信息,如备份时长,备份速率等

col TIME_TAKEN_DISPLAY for a10
col INPUG_SIZE for a10
col OUTPUG_SIZE for a10
col "output/s" for a10
col status for a10
col OUT_P for a5
select start_time,time_taken_display,status, input_type, 
output_device_type OUT_P, input_bytes_display INPUG_SIZE, output_bytes_display OUTPUG_SIZE, output_bytes_per_sec_display as "output/s"
     from v$rman_backup_job_details
     where start_time>sysdate-2
     order by start_time DESC;

START_TIME   TIME_TAKEN STATUS     INPUT_TYPE    OUT_P INPUG_SIZE OUTPUG_SIZ output/s
------------ ---------- ---------- ------------- ----- ---------- ---------- ----------
04-DEC-21    06:00:19   COMPLETED  DB FULL       DISK      1.65T    356.09G     16.87M
04-DEC-21    00:00:42   COMPLETED  DB INCR       DISK      6.47G    179.70M      4.28M
04-DEC-21    00:25:03   COMPLETED  DB INCR       DISK    863.60G      3.31G      2.26M
04-DEC-21    00:00:34   COMPLETED  DB INCR       DISK      1.50G    178.20M      5.24M
04-DEC-21    00:05:43   COMPLETED  DB INCR       DISK    213.78G    178.29M    532.27K
04-DEC-21    00:01:03   COMPLETED  DB INCR       DISK     11.72G    177.88M      2.82M
04-DEC-21    00:07:59   COMPLETED  DB INCR       DISK    280.83G    178.94M    382.53K
04-DEC-21    00:00:54   COMPLETED  DB INCR       DISK     14.79G    203.09M      3.76M
04-DEC-21    00:00:43   COMPLETED  DB INCR       DISK      4.29G    178.66M      4.15M
04-DEC-21    00:00:31   COMPLETED  DB INCR       DISK      2.25G    178.18M      5.75M
03-DEC-21    00:00:42   COMPLETED  DB INCR       DISK      6.47G    178.53M      4.25M
03-DEC-21    00:28:43   COMPLETED  DB INCR       DISK    862.26G      3.34G      1.99M
03-DEC-21    00:00:34   COMPLETED  DB INCR       DISK      1.50G    178.24M      5.24M
03-DEC-21    00:06:04   COMPLETED  DB INCR       DISK    213.78G    178.28M    501.54K
03-DEC-21    00:01:03   COMPLETED  DB INCR       DISK     11.72G    177.96M      2.82M
03-DEC-21    00:08:04   COMPLETED  DB INCR       DISK    280.83G    184.77M    390.91K
03-DEC-21    00:00:54   COMPLETED  DB INCR       DISK     14.79G    256.85M      4.76M
03-DEC-21    00:00:44   COMPLETED  DB INCR       DISK      4.29G    178.77M      4.06M
03-DEC-21    00:00:35   COMPLETED  DB INCR       DISK      2.25G    178.29M      5.09M

19 rows selected.
上一篇:python简单LWE 加解密方案实现,支持密文同态加法以及常数乘法


下一篇:transformer代码笔记----decoder.py