Obtaining Information about RMAN backups using LIST command

O comando LIST nos auxilia a extrair diversas informações sobre os nossos backups do RMAN. Para simular o seu uso, dispararemos uma porção de backups abaixo para utilizar o comando posteriormente.

Ajustando política de redundância do RMAN:

[oracle@oel8 ~]$ rman target /
 
Recovery Manager: Release 18.0.0.0.0 - Production on Fri Apr 9 04:29:35 2021
Version 18.13.0.0.0
 
Copyright (c) 1982, 2018, Oracle and/or its affiliates.  All rights reserved.
 
connected to target database: RMANDB (DBID=3825250984)
 
RMAN> SHOW RETENTION POLICY;
 
using target database control file instead of recovery catalog
RMAN configuration parameters for database with db_unique_name RMANDB are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
 
RMAN> CONFIGURE RETENTION POLICY TO REDUNDANCY 2;
 
new RMAN configuration parameters:
CONFIGURE RETENTION POLICY TO REDUNDANCY 2;
new RMAN configuration parameters are successfully stored
 
RMAN>

Realizando backup do banco como backupset:

RMAN> BACKUP AS BACKUPSET DATABASE TAG 'DB_FULL_BS';
 
Starting backup at 2021-04-09:04:31:05
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=1 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/oracle/dados/RMANDB/datafile/o1_mf_system_h8nynqfx_.dbf
input datafile file number=00003 name=/oracle/dados/RMANDB/datafile/o1_mf_sysaux_h8nyq35q_.dbf
input datafile file number=00004 name=/oracle/dados/RMANDB/datafile/o1_mf_undotbs1_h8nyrjdr_.dbf
input datafile file number=00005 name=/oracle/dados/RMANDB/datafile/ts_cortex_catalog.dbf
input datafile file number=00007 name=/oracle/dados/RMANDB/datafile/o1_mf_users_h8nyrkn7_.dbf
channel ORA_DISK_1: starting piece 1 at 2021-04-09:04:31:05
channel ORA_DISK_1: finished piece 1 at 2021-04-09:04:32:21
piece handle=/oracle/fra/RMANDB/backupset/2021_04_09/o1_mf_nnndf_DB_FULL_BS_j700oxtx_.bkp tag=DB_FULL_BS comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:16
Finished backup at 2021-04-09:04:32:21
 
Starting Control File and SPFILE Autobackup at 2021-04-09:04:32:21
piece handle=/oracle/fra/RMANDB/autobackup/2021_04_09/o1_mf_s_1069389141_j700r62m_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 2021-04-09:04:32:24

Executando o backup da tablespace USERS 2 vezes:

RMAN> BACKUP TABLESPACE USERS TAG 'USERS_BS';
 
Starting backup at 2021-04-09:04:34:08
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00007 name=/oracle/dados/RMANDB/datafile/o1_mf_users_h8nyrkn7_.dbf
channel ORA_DISK_1: starting piece 1 at 2021-04-09:04:34:09
channel ORA_DISK_1: finished piece 1 at 2021-04-09:04:34:10
piece handle=/oracle/fra/RMANDB/backupset/2021_04_09/o1_mf_nnndf_USERS_BS_j700vk1w_.bkp tag=USERS_BS comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 2021-04-09:04:34:10
 
Starting Control File and SPFILE Autobackup at 2021-04-09:04:34:10
piece handle=/oracle/fra/RMANDB/autobackup/2021_04_09/o1_mf_s_1069389250_j700vlmc_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 2021-04-09:04:34:11
 
RMAN> BACKUP TABLESPACE USERS TAG 'USERS_BS';
 
Starting backup at 2021-04-09:04:34:16
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00007 name=/oracle/dados/RMANDB/datafile/o1_mf_users_h8nyrkn7_.dbf
channel ORA_DISK_1: starting piece 1 at 2021-04-09:04:34:16
channel ORA_DISK_1: finished piece 1 at 2021-04-09:04:34:17
piece handle=/oracle/fra/RMANDB/backupset/2021_04_09/o1_mf_nnndf_USERS_BS_j700vrh3_.bkp tag=USERS_BS comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 2021-04-09:04:34:17
 
Starting Control File and SPFILE Autobackup at 2021-04-09:04:34:17
piece handle=/oracle/fra/RMANDB/autobackup/2021_04_09/o1_mf_s_1069389257_j700vt63_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 2021-04-09:04:34:20

Disparando backup do banco de dados como image copy:

RMAN> BACKUP AS COPY DATABASE TAG 'DB_FULL_CP';
 
Starting backup at 2021-04-09:04:37:57
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
input datafile file number=00001 name=/oracle/dados/RMANDB/datafile/o1_mf_system_h8nynqfx_.dbf
output file name=/oracle/fra/RMANDB/datafile/o1_mf_system_j7012ook_.dbf tag=DB_FULL_CP RECID=38 STAMP=1069389517
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:45
channel ORA_DISK_1: starting datafile copy
input datafile file number=00003 name=/oracle/dados/RMANDB/datafile/o1_mf_sysaux_h8nyq35q_.dbf
output file name=/oracle/fra/RMANDB/datafile/o1_mf_sysaux_j70142vo_.dbf tag=DB_FULL_CP RECID=39 STAMP=1069389555
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:35
channel ORA_DISK_1: starting datafile copy
input datafile file number=00004 name=/oracle/dados/RMANDB/datafile/o1_mf_undotbs1_h8nyrjdr_.dbf
output file name=/oracle/fra/RMANDB/datafile/o1_mf_undotbs1_j701561x_.dbf tag=DB_FULL_CP RECID=40 STAMP=1069389580
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:25
channel ORA_DISK_1: starting datafile copy
input datafile file number=00005 name=/oracle/dados/RMANDB/datafile/ts_cortex_catalog.dbf
output file name=/oracle/fra/RMANDB/datafile/o1_mf_ts_corte_j7015z6l_.dbf tag=DB_FULL_CP RECID=41 STAMP=1069389593
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting datafile copy
input datafile file number=00007 name=/oracle/dados/RMANDB/datafile/o1_mf_users_h8nyrkn7_.dbf
output file name=/oracle/fra/RMANDB/datafile/o1_mf_users_j7016gbr_.dbf tag=DB_FULL_CP RECID=42 STAMP=1069389598
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
Finished backup at 2021-04-09:04:39:59
 
Starting Control File and SPFILE Autobackup at 2021-04-09:04:39:59
piece handle=/oracle/fra/RMANDB/autobackup/2021_04_09/o1_mf_s_1069389599_j7016hx3_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 2021-04-09:04:40:00

Backup dos archive logs:

RMAN> BACKUP ARCHIVELOG ALL TAG 'ARC_BS';
 
Starting backup at 2021-04-09:04:43:00
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=67 RECID=74 STAMP=1068374400
input archived log thread=1 sequence=68 RECID=75 STAMP=1069389781
channel ORA_DISK_1: starting piece 1 at 2021-04-09:04:43:02
channel ORA_DISK_1: finished piece 1 at 2021-04-09:04:43:05
piece handle=/oracle/fra/RMANDB/backupset/2021_04_09/o1_mf_annnn_ARC_BS_j701d662_.bkp tag=ARC_BS comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
Finished backup at 2021-04-09:04:43:05
 
Starting Control File and SPFILE Autobackup at 2021-04-09:04:43:05
piece handle=/oracle/fra/RMANDB/autobackup/2021_04_09/o1_mf_s_1069389785_j701d9kj_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 2021-04-09:04:43:06

Backup dos archive logs como image copy:

RMAN> BACKUP AS COPY ARCHIVELOG ALL;
 
Starting backup at 2021-04-09:04:49:50
current log archived
using channel ORA_DISK_1
skipping archived logs of thread 1 from sequence 67 to 68; already backed up
channel ORA_DISK_1: starting archived log copy
input archived log thread=1 sequence=69 RECID=76 STAMP=1069390190
output file name=/oracle/fra/RMANDB/archivelog/2021_04_09/o1_mf_1_69_j701rz69_.arc RECID=77 STAMP=1069390191
channel ORA_DISK_1: archived log copy complete, elapsed time: 00:00:01
Finished backup at 2021-04-09:04:49:52
 
Starting Control File and SPFILE Autobackup at 2021-04-09:04:49:52
piece handle=/oracle/fra/RMANDB/autobackup/2021_04_09/o1_mf_s_1069390192_j701s0pz_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 2021-04-09:04:49:53

O comando abaixo apresenta os backupsets gerados no ambiente:

RMAN> LIST BACKUP;
 
 
List of Backup Sets
===================
 
 
BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
154     Full    1.23G      DISK        00:00:58     2021-04-09:04:32:03
        BP Key: 154   Status: AVAILABLE  Compressed: NO  Tag: DB_FULL_BS
        Piece Name: /oracle/fra/RMANDB/backupset/2021_04_09/o1_mf_nnndf_DB_FULL_BS_j700oxtx_.bkp
  List of Datafiles in backup set 154
  File LV Type Ckp SCN    Ckp Time            Abs Fuz SCN Sparse Name
  ---- -- ---- ---------- ------------------- ----------- ------ ----
  1       Full 2260904    2021-04-09:04:31:05              NO    /oracle/dados/RMANDB/datafile/o1_mf_system_h8nynqfx_.dbf
  3       Full 2260904    2021-04-09:04:31:05              NO    /oracle/dados/RMANDB/datafile/o1_mf_sysaux_h8nyq35q_.dbf
  4       Full 2260904    2021-04-09:04:31:05              NO    /oracle/dados/RMANDB/datafile/o1_mf_undotbs1_h8nyrjdr_.dbf
  5       Full 2260904    2021-04-09:04:31:05              NO    /oracle/dados/RMANDB/datafile/ts_cortex_catalog.dbf
  7       Full 2260904    2021-04-09:04:31:05              NO    /oracle/dados/RMANDB/datafile/o1_mf_users_h8nyrkn7_.dbf
 
BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
155     Full    10.52M     DISK        00:00:01     2021-04-09:04:32:22
        BP Key: 155   Status: AVAILABLE  Compressed: NO  Tag: TAG20210409T043221
        Piece Name: /oracle/fra/RMANDB/autobackup/2021_04_09/o1_mf_s_1069389141_j700r62m_.bkp
  SPFILE Included: Modification time: 2021-04-09:04:17:52
  SPFILE db_unique_name: RMANDB
  Control File Included: Ckp SCN: 2261675      Ckp time: 2021-04-09:04:32:21
 
BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
156     Full    2.16M      DISK        00:00:00     2021-04-09:04:34:09
        BP Key: 156   Status: AVAILABLE  Compressed: NO  Tag: USERS_BS
        Piece Name: /oracle/fra/RMANDB/backupset/2021_04_09/o1_mf_nnndf_USERS_BS_j700vk1w_.bkp
  List of Datafiles in backup set 156
  File LV Type Ckp SCN    Ckp Time            Abs Fuz SCN Sparse Name
  ---- -- ---- ---------- ------------------- ----------- ------ ----
  7       Full 2261773    2021-04-09:04:34:09              NO    /oracle/dados/RMANDB/datafile/o1_mf_users_h8nyrkn7_.dbf
 
BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
157     Full    10.52M     DISK        00:00:00     2021-04-09:04:34:10
        BP Key: 157   Status: AVAILABLE  Compressed: NO  Tag: TAG20210409T043410
        Piece Name: /oracle/fra/RMANDB/autobackup/2021_04_09/o1_mf_s_1069389250_j700vlmc_.bkp
  SPFILE Included: Modification time: 2021-04-09:04:17:52
  SPFILE db_unique_name: RMANDB
  Control File Included: Ckp SCN: 2261782      Ckp time: 2021-04-09:04:34:10
 
BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
158     Full    2.16M      DISK        00:00:00     2021-04-09:04:34:16
        BP Key: 158   Status: AVAILABLE  Compressed: NO  Tag: USERS_BS
        Piece Name: /oracle/fra/RMANDB/backupset/2021_04_09/o1_mf_nnndf_USERS_BS_j700vrh3_.bkp
  List of Datafiles in backup set 158
  File LV Type Ckp SCN    Ckp Time            Abs Fuz SCN Sparse Name
  ---- -- ---- ---------- ------------------- ----------- ------ ----
  7       Full 2261805    2021-04-09:04:34:16              NO    /oracle/dados/RMANDB/datafile/o1_mf_users_h8nyrkn7_.dbf
 
BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
159     Full    10.52M     DISK        00:00:01     2021-04-09:04:34:18
        BP Key: 159   Status: AVAILABLE  Compressed: NO  Tag: TAG20210409T043417
        Piece Name: /oracle/fra/RMANDB/autobackup/2021_04_09/o1_mf_s_1069389257_j700vt63_.bkp
  SPFILE Included: Modification time: 2021-04-09:04:17:52
  SPFILE db_unique_name: RMANDB
  Control File Included: Ckp SCN: 2261815      Ckp time: 2021-04-09:04:34:17
 
BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
160     Full    10.52M     DISK        00:00:00     2021-04-09:04:39:59
        BP Key: 160   Status: AVAILABLE  Compressed: NO  Tag: TAG20210409T043959
        Piece Name: /oracle/fra/RMANDB/autobackup/2021_04_09/o1_mf_s_1069389599_j7016hx3_.bkp
  SPFILE Included: Modification time: 2021-04-09:04:17:52
  SPFILE db_unique_name: RMANDB
  Control File Included: Ckp SCN: 2262018      Ckp time: 2021-04-09:04:39:59
 
BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ -------------------
161     71.87M     DISK        00:00:00     2021-04-09:04:43:02
        BP Key: 161   Status: AVAILABLE  Compressed: NO  Tag: ARC_BS
        Piece Name: /oracle/fra/RMANDB/backupset/2021_04_09/o1_mf_annnn_ARC_BS_j701d662_.bkp
 
  List of Archived Logs in backup set 161
  Thrd Seq     Low SCN    Low Time            Next SCN   Next Time
  ---- ------- ---------- ------------------- ---------- ---------
  1    67      2245574    2021-03-27:05:26:16 2255756    2021-03-28:10:39:58
  1    68      2255756    2021-03-28:10:39:58 2262113    2021-04-09:04:43:00
 
BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
162     Full    10.52M     DISK        00:00:00     2021-04-09:04:43:05
        BP Key: 162   Status: AVAILABLE  Compressed: NO  Tag: TAG20210409T044305
        Piece Name: /oracle/fra/RMANDB/autobackup/2021_04_09/o1_mf_s_1069389785_j701d9kj_.bkp
  SPFILE Included: Modification time: 2021-04-09:04:17:52
  SPFILE db_unique_name: RMANDB
  Control File Included: Ckp SCN: 2262164      Ckp time: 2021-04-09:04:43:05
 
BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
163     Full    10.52M     DISK        00:00:00     2021-04-09:04:49:52
        BP Key: 163   Status: AVAILABLE  Compressed: NO  Tag: TAG20210409T044952
        Piece Name: /oracle/fra/RMANDB/autobackup/2021_04_09/o1_mf_s_1069390192_j701s0pz_.bkp
  SPFILE Included: Modification time: 2021-04-09:04:17:52
  SPFILE db_unique_name: RMANDB
  Control File Included: Ckp SCN: 2262521      Ckp time: 2021-04-09:04:49:52

Para termos um formato mais palatável, podemos usar o SUMMARY conforme exemplo abaixo:

RMAN> LIST BACKUP SUMMARY;
 
 
List of Backups
===============
Key     TY LV S Device Type Completion Time     #Pieces #Copies Compressed Tag
------- -- -- - ----------- ------------------- ------- ------- ---------- ---
154     B  F  A DISK        2021-04-09:04:32:03 1       1       NO         DB_FULL_BS
155     B  F  A DISK        2021-04-09:04:32:22 1       1       NO         TAG20210409T043221
156     B  F  A DISK        2021-04-09:04:34:09 1       1       NO         USERS_BS
157     B  F  A DISK        2021-04-09:04:34:10 1       1       NO         TAG20210409T043410
158     B  F  A DISK        2021-04-09:04:34:16 1       1       NO         USERS_BS
159     B  F  A DISK        2021-04-09:04:34:18 1       1       NO         TAG20210409T043417
160     B  F  A DISK        2021-04-09:04:39:59 1       1       NO         TAG20210409T043959
161     B  A  A DISK        2021-04-09:04:43:02 1       1       NO         ARC_BS
162     B  F  A DISK        2021-04-09:04:43:05 1       1       NO         TAG20210409T044305
163     B  F  A DISK        2021-04-09:04:49:52 1       1       NO         TAG20210409T044952

Podemos listar os backups do banco de dados:

RMAN> LIST BACKUP OF DATABASE;
 
 
List of Backup Sets
===================
 
 
BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
154     Full    1.23G      DISK        00:00:58     2021-04-09:04:32:03
        BP Key: 154   Status: AVAILABLE  Compressed: NO  Tag: DB_FULL_BS
        Piece Name: /oracle/fra/RMANDB/backupset/2021_04_09/o1_mf_nnndf_DB_FULL_BS_j700oxtx_.bkp
  List of Datafiles in backup set 154
  File LV Type Ckp SCN    Ckp Time            Abs Fuz SCN Sparse Name
  ---- -- ---- ---------- ------------------- ----------- ------ ----
  1       Full 2260904    2021-04-09:04:31:05              NO    /oracle/dados/RMANDB/datafile/o1_mf_system_h8nynqfx_.dbf
  3       Full 2260904    2021-04-09:04:31:05              NO    /oracle/dados/RMANDB/datafile/o1_mf_sysaux_h8nyq35q_.dbf
  4       Full 2260904    2021-04-09:04:31:05              NO    /oracle/dados/RMANDB/datafile/o1_mf_undotbs1_h8nyrjdr_.dbf
  5       Full 2260904    2021-04-09:04:31:05              NO    /oracle/dados/RMANDB/datafile/ts_cortex_catalog.dbf
  7       Full 2260904    2021-04-09:04:31:05              NO    /oracle/dados/RMANDB/datafile/o1_mf_users_h8nyrkn7_.dbf
 
BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
156     Full    2.16M      DISK        00:00:00     2021-04-09:04:34:09
        BP Key: 156   Status: AVAILABLE  Compressed: NO  Tag: USERS_BS
        Piece Name: /oracle/fra/RMANDB/backupset/2021_04_09/o1_mf_nnndf_USERS_BS_j700vk1w_.bkp
  List of Datafiles in backup set 156
  File LV Type Ckp SCN    Ckp Time            Abs Fuz SCN Sparse Name
  ---- -- ---- ---------- ------------------- ----------- ------ ----
  7       Full 2261773    2021-04-09:04:34:09              NO    /oracle/dados/RMANDB/datafile/o1_mf_users_h8nyrkn7_.dbf
 
BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
158     Full    2.16M      DISK        00:00:00     2021-04-09:04:34:16
        BP Key: 158   Status: AVAILABLE  Compressed: NO  Tag: USERS_BS
        Piece Name: /oracle/fra/RMANDB/backupset/2021_04_09/o1_mf_nnndf_USERS_BS_j700vrh3_.bkp
  List of Datafiles in backup set 158
  File LV Type Ckp SCN    Ckp Time            Abs Fuz SCN Sparse Name
  ---- -- ---- ---------- ------------------- ----------- ------ ----
  7       Full 2261805    2021-04-09:04:34:16              NO    /oracle/dados/RMANDB/datafile/o1_mf_users_h8nyrkn7_.dbf

Exibindo os backups do tipo image copy:

RMAN> LIST COPY;
 
specification does not match any control file copy in the repository
List of Datafile Copies
=======================
 
Key     File S Completion Time     Ckp SCN    Ckp Time            Sparse
------- ---- - ------------------- ---------- ------------------- ------
38      1    A 2021-04-09:04:38:37 2261947    2021-04-09:04:37:57 NO
        Name: /oracle/fra/RMANDB/datafile/o1_mf_system_j7012ook_.dbf
        Tag: DB_FULL_CP
 
39      3    A 2021-04-09:04:39:15 2261976    2021-04-09:04:38:42 NO
        Name: /oracle/fra/RMANDB/datafile/o1_mf_sysaux_j70142vo_.dbf
        Tag: DB_FULL_CP
 
40      4    A 2021-04-09:04:39:40 2261992    2021-04-09:04:39:18 NO
        Name: /oracle/fra/RMANDB/datafile/o1_mf_undotbs1_j701561x_.dbf
        Tag: DB_FULL_CP
 
41      5    A 2021-04-09:04:39:53 2262002    2021-04-09:04:39:43 NO
        Name: /oracle/fra/RMANDB/datafile/o1_mf_ts_corte_j7015z6l_.dbf
        Tag: DB_FULL_CP
 
42      7    A 2021-04-09:04:39:58 2262009    2021-04-09:04:39:58 NO
        Name: /oracle/fra/RMANDB/datafile/o1_mf_users_j7016gbr_.dbf
        Tag: DB_FULL_CP
 
List of Archived Log Copies for database with db_unique_name RMANDB
=====================================================================
 
Key     Thrd Seq     S Low Time
------- ---- ------- - -------------------
74      1    67      A 2021-03-27:05:26:16
        Name: /oracle/archives/1_67_1036964654.dbf
 
75      1    68      A 2021-03-28:10:39:58
        Name: /oracle/archives/1_68_1036964654.dbf
 
77      1    69      A 2021-04-09:04:43:00
        Name: /oracle/fra/RMANDB/archivelog/2021_04_09/o1_mf_1_69_j701rz69_.arc
 
76      1    69      A 2021-04-09:04:43:00
        Name: /oracle/archives/1_69_1036964654.dbf

Exibir os backupsets que compõem o backup da tablespace USERS:

RMAN> LIST BACKUP OF TABLESPACE USERS;
 
 
List of Backup Sets
===================
 
 
BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
154     Full    1.23G      DISK        00:00:58     2021-04-09:04:32:03
        BP Key: 154   Status: AVAILABLE  Compressed: NO  Tag: DB_FULL_BS
        Piece Name: /oracle/fra/RMANDB/backupset/2021_04_09/o1_mf_nnndf_DB_FULL_BS_j700oxtx_.bkp
  List of Datafiles in backup set 154
  File LV Type Ckp SCN    Ckp Time            Abs Fuz SCN Sparse Name
  ---- -- ---- ---------- ------------------- ----------- ------ ----
  7       Full 2260904    2021-04-09:04:31:05              NO    /oracle/dados/RMANDB/datafile/o1_mf_users_h8nyrkn7_.dbf
 
BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
156     Full    2.16M      DISK        00:00:00     2021-04-09:04:34:09
        BP Key: 156   Status: AVAILABLE  Compressed: NO  Tag: USERS_BS
        Piece Name: /oracle/fra/RMANDB/backupset/2021_04_09/o1_mf_nnndf_USERS_BS_j700vk1w_.bkp
  List of Datafiles in backup set 156
  File LV Type Ckp SCN    Ckp Time            Abs Fuz SCN Sparse Name
  ---- -- ---- ---------- ------------------- ----------- ------ ----
  7       Full 2261773    2021-04-09:04:34:09              NO    /oracle/dados/RMANDB/datafile/o1_mf_users_h8nyrkn7_.dbf
 
BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
158     Full    2.16M      DISK        00:00:00     2021-04-09:04:34:16
        BP Key: 158   Status: AVAILABLE  Compressed: NO  Tag: USERS_BS
        Piece Name: /oracle/fra/RMANDB/backupset/2021_04_09/o1_mf_nnndf_USERS_BS_j700vrh3_.bkp
  List of Datafiles in backup set 158
  File LV Type Ckp SCN    Ckp Time            Abs Fuz SCN Sparse Name
  ---- -- ---- ---------- ------------------- ----------- ------ ----
  7       Full 2261805    2021-04-09:04:34:16              NO    /oracle/dados/RMANDB/datafile/o1_mf_users_h8nyrkn7_.dbf

Image copies com o backup da tablespace USERS:

RMAN> LIST COPY OF TABLESPACE USERS;
 
List of Datafile Copies
=======================
 
Key     File S Completion Time     Ckp SCN    Ckp Time            Sparse
------- ---- - ------------------- ---------- ------------------- ------
42      7    A 2021-04-09:04:39:58 2262009    2021-04-09:04:39:58 NO
        Name: /oracle/fra/RMANDB/datafile/o1_mf_users_j7016gbr_.dbf
        Tag: DB_FULL_CP

Backupsets filtrados por tag:

RMAN> LIST BACKUPSET TAG 'ARC_BS';
 
 
List of Backup Sets
===================
 
 
BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ -------------------
161     71.87M     DISK        00:00:00     2021-04-09:04:43:02
        BP Key: 161   Status: AVAILABLE  Compressed: NO  Tag: ARC_BS
        Piece Name: /oracle/fra/RMANDB/backupset/2021_04_09/o1_mf_annnn_ARC_BS_j701d662_.bkp
 
  List of Archived Logs in backup set 161
  Thrd Seq     Low SCN    Low Time            Next SCN   Next Time
  ---- ------- ---------- ------------------- ---------- ---------
  1    67      2245574    2021-03-27:05:26:16 2255756    2021-03-28:10:39:58
  1    68      2255756    2021-03-28:10:39:58 2262113    2021-04-09:04:43:00

Listando todos os archive logs:

RMAN> LIST ARCHIVELOG ALL;
 
List of Archived Log Copies for database with db_unique_name RMANDB
=====================================================================
 
Key     Thrd Seq     S Low Time
------- ---- ------- - -------------------
74      1    67      A 2021-03-27:05:26:16
        Name: /oracle/archives/1_67_1036964654.dbf
 
75      1    68      A 2021-03-28:10:39:58
        Name: /oracle/archives/1_68_1036964654.dbf
 
77      1    69      A 2021-04-09:04:43:00
        Name: /oracle/fra/RMANDB/archivelog/2021_04_09/o1_mf_1_69_j701rz69_.arc
 
76      1    69      A 2021-04-09:04:43:00
        Name: /oracle/archives/1_69_1036964654.dbf

Exibindo archive logs gerados nas últimas 24 horas:

RMAN> LIST ARCHIVELOG TIME BETWEEN 'SYSDATE-1' AND 'SYSDATE';
 
List of Archived Log Copies for database with db_unique_name RMANDB
=====================================================================
 
Key     Thrd Seq     S Low Time
------- ---- ------- - -------------------
75      1    68      A 2021-03-28:10:39:58
        Name: /oracle/archives/1_68_1036964654.dbf
 
77      1    69      A 2021-04-09:04:43:00
        Name: /oracle/fra/RMANDB/archivelog/2021_04_09/o1_mf_1_69_j701rz69_.arc
 
76      1    69      A 2021-04-09:04:43:00
        Name: /oracle/archives/1_69_1036964654.dbf

Usando SEQUENCE como filtro:

RMAN> LIST ARCHIVELOG SEQUENCE BETWEEN 67 and 68;
 
List of Archived Log Copies for database with db_unique_name RMANDB
=====================================================================
 
Key     Thrd Seq     S Low Time
------- ---- ------- - -------------------
74      1    67      A 2021-03-27:05:26:16
        Name: /oracle/archives/1_67_1036964654.dbf
 
75      1    68      A 2021-03-28:10:39:58
        Name: /oracle/archives/1_68_1036964654.dbf

Listando os backups dos archive logs (como backupset):

RMAN> LIST BACKUP OF ARCHIVELOG ALL;
 
 
List of Backup Sets
===================
 
 
BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ -------------------
161     71.87M     DISK        00:00:00     2021-04-09:04:43:02
        BP Key: 161   Status: AVAILABLE  Compressed: NO  Tag: ARC_BS
        Piece Name: /oracle/fra/RMANDB/backupset/2021_04_09/o1_mf_annnn_ARC_BS_j701d662_.bkp
 
  List of Archived Logs in backup set 161
  Thrd Seq     Low SCN    Low Time            Next SCN   Next Time
  ---- ------- ---------- ------------------- ---------- ---------
  1    67      2245574    2021-03-27:05:26:16 2255756    2021-03-28:10:39:58
  1    68      2255756    2021-03-28:10:39:58 2262113    2021-04-09:04:43:00

Backups de archive log gerados nas últimas 24 horas:

RMAN> LIST BACKUP OF ARCHIVELOG TIME BETWEEN 'SYSDATE-1' AND 'SYSDATE';
 
 
List of Backup Sets
===================
 
 
BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ -------------------
161     71.87M     DISK        00:00:00     2021-04-09:04:43:02
        BP Key: 161   Status: AVAILABLE  Compressed: NO  Tag: ARC_BS
        Piece Name: /oracle/fra/RMANDB/backupset/2021_04_09/o1_mf_annnn_ARC_BS_j701d662_.bkp
 
  List of Archived Logs in backup set 161
  Thrd Seq     Low SCN    Low Time            Next SCN   Next Time
  ---- ------- ---------- ------------------- ---------- ---------
  1    68      2255756    2021-03-28:10:39:58 2262113    2021-04-09:04:43:00

Obs: Este procedimento foi criado pelo senhor Ahmed Baraka (www.ahmedbaraka.com) e foi apenas reproduzido por mim em um laboratório pessoal para fins de aprendizado.

Leave a Comment

Your email address will not be published.