Monday 28 May 2018

RMAN LIST Command and the ways you can use it - Oracle Database

RMAN LIST Command | Different Options available with the RMAN LIST Command


RMAN LIST Command


RMAN List command helps you list information regarding different RMAN Backups, Archivelogs and the Database Incarnation. Below mentioned are some different ways in which you can use the RMAN LIST command to get the information you are looking for.

1) To list all the available backups (Database, archivelogs, controlfile/SPFile)

RMAN> list backup;
using target database control file instead of recovery catalog

List of Backup Sets
===================

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
8       Full    679.72M    DISK        00:00:25     25-MAY-18   
        BP Key: 8   Status: AVAILABLE  Compressed: NO  Tag: TAG20180525T184932
        Piece Name: /u01/app/oracle/fast_recovery_area/ORADB12C/backupset/2018_05_25/o1_mf_nnndf_TAG20180525T184932_fjj3c7w7_.bkp
  List of Datafiles in backup set 8
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1       Full 1772904    25-MAY-18 /u01/app/oracle/oradata/oradb12c/system01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
9       Full    9.64M      DISK        00:00:16     25-MAY-18   
        BP Key: 9   Status: AVAILABLE  Compressed: NO  Tag: TAG20180525T185010
        Piece Name: /u01/app/oracle/fast_recovery_area/ORADB12C/autobackup/2018_05_25/o1_mf_s_977079013_fjj3dt0l_.bkp
  SPFILE Included: Modification time: 25-MAY-18
  SPFILE db_unique_name: ORADB12C
  Control File Included: Ckp SCN: 1772931      Ckp time: 25-MAY-18

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
10      9.71M      DISK        00:00:03     25-MAY-18   
        BP Key: 10   Status: AVAILABLE  Compressed: NO  Tag: TAG20180525T185747
        Piece Name: /u01/app/oracle/fast_recovery_area/ORADB12C/backupset/2018_05_25/o1_mf_annnn_TAG20180525T185747_fjj3totx_.bkp

  List of Archived Logs in backup set 10
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    18      1766721    25-MAY-18 1772965    25-MAY-18
  1    19      1772965    25-MAY-18 1773278    25-MAY-18
  1    20      1773278    25-MAY-18 1773291    25-MAY-18

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
11      Full    9.64M      DISK        00:00:14     25-MAY-18   
        BP Key: 11   Status: AVAILABLE  Compressed: NO  Tag: TAG20180525T185806
        Piece Name: /u01/app/oracle/fast_recovery_area/ORADB12C/autobackup/2018_05_25/o1_mf_s_977079488_fjj3vn2o_.bkp
  SPFILE Included: Modification time: 25-MAY-18
  SPFILE db_unique_name: ORADB12C
  Control File Included: Ckp SCN: 1773416      Ckp time: 25-MAY-18


2) To list all the backups of Database (datafiles) only;

RMAN> list backup of database;

List of Backup Sets
===================

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
8       Full    679.72M    DISK        00:00:25     25-MAY-18   
        BP Key: 8   Status: AVAILABLE  Compressed: NO  Tag: TAG20180525T184932
        Piece Name: /u01/app/oracle/fast_recovery_area/ORADB12C/backupset/2018_05_25/o1_mf_nnndf_TAG20180525T184932_fjj3c7w7_.bkp
  List of Datafiles in backup set 8
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1       Full 1772904    25-MAY-18 /u01/app/oracle/oradata/oradb12c/system01.dbf


3) To list backups of a particular datafile, if you know the datafile number.

RMAN> list backup of datafile 1;

List of Backup Sets
===================

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
8       Full    679.72M    DISK        00:00:25     25-MAY-18   
        BP Key: 8   Status: AVAILABLE  Compressed: NO  Tag: TAG20180525T184932
        Piece Name: /u01/app/oracle/fast_recovery_area/ORADB12C/backupset/2018_05_25/o1_mf_nnndf_TAG20180525T184932_fjj3c7w7_.bkp
  List of Datafiles in backup set 8
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1       Full 1772904    25-MAY-18 /u01/app/oracle/oradata/oradb12c/system01.dbf


4) To list of backup of datafile using datafile name.

RMAN> list backup of datafile '/u01/app/oracle/oradata/oradb12c/system01.dbf';

List of Backup Sets
===================

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
8       Full    679.72M    DISK        00:00:25     25-MAY-18   
        BP Key: 8   Status: AVAILABLE  Compressed: NO  Tag: TAG20180525T184932
        Piece Name: /u01/app/oracle/fast_recovery_area/ORADB12C/backupset/2018_05_25/o1_mf_nnndf_TAG20180525T184932_fjj3c7w7_.bkp
  List of Datafiles in backup set 8
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1       Full 1772904    25-MAY-18 /u01/app/oracle/oradata/oradb12c/system01.dbf

5) To list backups of archivelogs.

RMAN> list backup of archivelog all;

List of Backup Sets
===================

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
10      9.71M      DISK        00:00:03     25-MAY-18   
        BP Key: 10   Status: AVAILABLE  Compressed: NO  Tag: TAG20180525T185747
        Piece Name: /u01/app/oracle/fast_recovery_area/ORADB12C/backupset/2018_05_25/o1_mf_annnn_TAG20180525T185747_fjj3totx_.bkp

  List of Archived Logs in backup set 10
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    18      1766721    25-MAY-18 1772965    25-MAY-18
  1    19      1772965    25-MAY-18 1773278    25-MAY-18
  1    20      1773278    25-MAY-18 1773291    25-MAY-18

6) To list backups of Controlfile.

RMAN> list backup of controlfile;

List of Backup Sets
===================

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
9       Full    9.64M      DISK        00:00:16     25-MAY-18   
        BP Key: 9   Status: AVAILABLE  Compressed: NO  Tag: TAG20180525T185010
        Piece Name: /u01/app/oracle/fast_recovery_area/ORADB12C/autobackup/2018_05_25/o1_mf_s_977079013_fjj3dt0l_.bkp
  Control File Included: Ckp SCN: 1772931      Ckp time: 25-MAY-18

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
11      Full    9.64M      DISK        00:00:14     25-MAY-18   
        BP Key: 11   Status: AVAILABLE  Compressed: NO  Tag: TAG20180525T185806
        Piece Name: /u01/app/oracle/fast_recovery_area/ORADB12C/autobackup/2018_05_25/o1_mf_s_977079488_fjj3vn2o_.bkp
  Control File Included: Ckp SCN: 1773416      Ckp time: 25-MAY-18

7) To list backups of Server Parameter File (SPFILE).

RMAN> list backup of spfile;

List of Backup Sets
===================

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
9       Full    9.64M      DISK        00:00:16     25-MAY-18   
        BP Key: 9   Status: AVAILABLE  Compressed: NO  Tag: TAG20180525T185010
        Piece Name: /u01/app/oracle/fast_recovery_area/ORADB12C/autobackup/2018_05_25/o1_mf_s_977079013_fjj3dt0l_.bkp
  SPFILE Included: Modification time: 25-MAY-18
  SPFILE db_unique_name: ORADB12C

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
11      Full    9.64M      DISK        00:00:14     25-MAY-18   
        BP Key: 11   Status: AVAILABLE  Compressed: NO  Tag: TAG20180525T185806
        Piece Name: /u01/app/oracle/fast_recovery_area/ORADB12C/autobackup/2018_05_25/o1_mf_s_977079488_fjj3vn2o_.bkp
  SPFILE Included: Modification time: 25-MAY-18
  SPFILE db_unique_name: ORADB12C

8) To list a particular backupset using key.

RMAN> list backupset 8;

List of Backup Sets
===================

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
8       Full    679.72M    DISK        00:00:25     25-MAY-18   
        BP Key: 8   Status: AVAILABLE  Compressed: NO  Tag: TAG20180525T184932
        Piece Name: /u01/app/oracle/fast_recovery_area/ORADB12C/backupset/2018_05_25/o1_mf_nnndf_TAG20180525T184932_fjj3c7w7_.bkp
  List of Datafiles in backup set 8
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1       Full 1772904    25-MAY-18 /u01/app/oracle/oradata/oradb12c/system01.dbf

9) To list backups done as image copy of database;

RMAN> list datafilecopy all;

List of Datafile Copies
=======================

Key     File S Completion Time Ckp SCN    Ckp Time     
------- ---- - --------------- ---------- ---------------
6       3    A 25-MAY-18       1772499    25-MAY-18   
        Name: /u01/app/oracle/fast_recovery_area/ORADB12C/datafile/o1_mf_sysaux_fjj2lv9p_.dbf
        Tag: TAG20180525T183536

7       4    A 25-MAY-18       1772512    25-MAY-18   
        Name: /u01/app/oracle/fast_recovery_area/ORADB12C/datafile/o1_mf_undotbs1_fjj2msqq_.dbf
        Tag: TAG20180525T183536

4       5    A 25-MAY-18       1772475    25-MAY-18   
        Name: /u01/app/oracle/fast_recovery_area/ORADB12C/datafile/o1_mf_example_fjj2k3jx_.dbf
        Tag: TAG20180525T183536

8       6    A 25-MAY-18       1772519    25-MAY-18   
        Name: /u01/app/oracle/fast_recovery_area/ORADB12C/datafile/o1_mf_users_fjj2n8vh_.dbf
        Tag: TAG20180525T183536

10) To list backup of a particular datafile taken a image copy.

RMAN> list datafilecopy 4;

List of Datafile Copies
=======================

Key     File S Completion Time Ckp SCN    Ckp Time     
------- ---- - --------------- ---------- ---------------
4       5    A 25-MAY-18       1772475    25-MAY-18   
        Name: /u01/app/oracle/fast_recovery_area/ORADB12C/datafile/o1_mf_example_fjj2k3jx_.dbf
        Tag: TAG20180525T183536

11) To list backup of controlfile taken as copy.

RMAN> list copy of controlfile;

List of Control File Copies
===========================

Key     S Completion Time Ckp SCN    Ckp Time     
------- - --------------- ---------- ---------------
14      A 28-MAY-18       1938823    28-MAY-18   
        Name: /u01/app/oracle/fast_recovery_area/ORADB12C/controlfile/o1_mf_TAG20180528T184425_fjr05nd3_.ctl
        Tag: TAG20180528T184425

12) To list backup of a particular tablespace.

RMAN> list backup of tablespace SYSTEM;

List of Backup Sets
===================

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
8       Full    679.72M    DISK        00:00:25     25-MAY-18   
        BP Key: 8   Status: AVAILABLE  Compressed: NO  Tag: TAG20180525T184932
        Piece Name: /u01/app/oracle/fast_recovery_area/ORADB12C/backupset/2018_05_25/o1_mf_nnndf_TAG20180525T184932_fjj3c7w7_.bkp
  List of Datafiles in backup set 8
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1       Full 1772904    25-MAY-18 /u01/app/oracle/oradata/oradb12c/system01.dbf

13) To list the incarnation of database.

RMAN> list incarnation of database;

List of Database Incarnations
DB Key  Inc Key DB Name  DB ID            STATUS  Reset SCN  Reset Time
------- ------- -------- ---------------- --- ---------- ----------
1       1       ORADB12C 3836283445       PARENT  1          07-JUL-14
2       2       ORADB12C 3836283445       CURRENT 1594143    23-MAY-18

I hope this helps !!

No comments:

Post a Comment