RMAN report command

RMAN "REPORT" COMMAND

RMAN REPORT command is very useful command in order to know the names of the files which need to be backed according to a specified retention policy. 
    
RMAN> report need backup ;

RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 2
Report of files with less than 2 redundant backups
File #bkps Name
---- ----- -----------------------------------------------------
1    1     H:\FINANCE\SYSTEM01.DBF
2    0     H:\FINANCE\UNDOTBS01.DBF
3    0     H:\FINANCE\SYSAUX01.DBF
4    0     H:\RMAN\DATA_D-FINANCE_I-2590818756_TS-USERS_FNO-4_1IMVMG63.BKP
5    0     H:\FINANCE\NOLOGTS.DBF

RMAN> report need backup recovery window of 2 days;

Report of files that must be backed up to satisfy 2 days recovery window
File Days  Name
---- ----- -----------------------------------------------------
2    2322  H:\FINANCE\UNDOTBS01.DBF
3    2322  H:\FINANCE\SYSAUX01.DBF
4    2322  H:\RMAN\DATA_D-FINANCE_I-2590818756_TS-USERS_FNO-4_1IMVMG63.BKP

RMAN> report need backup recovery window of 3 days;

Report of files that must be backed up to satisfy 3 days recovery window
File Days  Name
---- ----- -----------------------------------------------------
2    2322  H:\FINANCE\UNDOTBS01.DBF
3    2322  H:\FINANCE\SYSAUX01.DBF
4    2322  H:\RMAN\DATA_D-FINANCE_I-2590818756_TS-USERS_FNO-4_1IMVMG63.BKP

RMAN> report need backup redundancy 3;

Report of files with less than 3 redundant backups
File #bkps Name
---- ----- -----------------------------------------------------
1    1     H:\FINANCE\SYSTEM01.DBF
2    0     H:\FINANCE\UNDOTBS01.DBF
3    0     H:\FINANCE\SYSAUX01.DBF
4    0     H:\RMAN\DATA_D-FINANCE_I-2590818756_TS-USERS_FNO-4_1IMVMG63.BKP
5    0     H:\FINANCE\NOLOGTS.DBF

RMAN> report need backup days 3;

Report of files whose recovery needs more than 3 days of archived logs
File Days  Name
---- ----- -----------------------------------------------------
2    2322  H:\FINANCE\UNDOTBS01.DBF
3    2322  H:\FINANCE\SYSAUX01.DBF
4    2322  H:\RMAN\DATA_D-FINANCE_I-2590818756_TS-USERS_FNO-4_1IMVMG63.BKP

RMAN> report need backup incremental 1;

Report of files that need more than 1 incrementals during recovery
File Incrementals Name
---- ------------ ----------------------------------------------


RMAN> report need backup incremental 0;

Report of files that need more than 0 incrementals during recovery
File Incrementals Name
---- ------------ ----------------------------------------------

RMAN> report need backup recovery window of 3 days database skip tablespace  nologts;

Report of files that must be backed up to satisfy 3 days recovery window
File Days  Name
---- ----- -----------------------------------------------------
2    2322  H:\FINANCE\UNDOTBS01.DBF
3    2322  H:\FINANCE\SYSAUX01.DBF
4    2322  H:\RMAN\DATA_D-FINANCE_I-2590818756_TS-USERS_FNO-4_1IMVMG63.BKP


RMAN> report need backup redundancy 3 datafile 3;

Report of files with less than 3 redundant backups
File #bkps Name
---- ----- -----------------------------------------------------
3    0     H:\FINANCE\SYSAUX01.DBF

RMAN> report need backup  tablespace  nologts;

RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 2
Report of files with less than 2 redundant backups
File #bkps Name
---- ----- -----------------------------------------------------
5    0     H:\FINANCE\NOLOGTS.DBF


RMAN> report need backup incremental 2;

Report of files that need more than 2 incrementals during recovery
File Incrementals Name
---- ------------ ----------------------------------------------

RMAN> report need backup incremental 1;

Report of files that need more than 1 incrementals during recovery
File Incrementals Name
---- ------------ ----------------------------------------------

RMAN> report need backup device type disk;

RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 2
Report of files with less than 2 redundant backups
File #bkps Name
---- ----- -----------------------------------------------------
1    1     H:\FINANCE\SYSTEM01.DBF
2    0     H:\FINANCE\UNDOTBS01.DBF
3    0     H:\FINANCE\SYSAUX01.DBF
4    0     H:\RMAN\DATA_D-FINANCE_I-2590818756_TS-USERS_FNO-4_1IMVMG63.BKP
5    0     H:\FINANCE\NOLOGTS.DBF

RMAN> report need backup device type sbt;

RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 2
Report of files with less than 2 redundant backups
File #bkps Name
---- ----- -----------------------------------------------------
1    0     H:\FINANCE\SYSTEM01.DBF
2    0     H:\FINANCE\UNDOTBS01.DBF
3    0     H:\FINANCE\SYSAUX01.DBF
4    0     H:\RMAN\DATA_D-FINANCE_I-2590818756_TS-USERS_FNO-4_1IMVMG63.BKP
5    0     H:\FINANCE\NOLOGTS.DBF

RMAN> report need backup  tablespace  nologts device type disk;

RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 2
Report of files with less than 2 redundant backups
File #bkps Name
---- ----- -----------------------------------------------------
5    0     H:\FINANCE\NOLOGTS.DBF

We can also use REPORT commands to know about the obsolete backups (with respect to a retention policy) which are not relevent. Suppose  you have set retention policy to redundancy 2 and have taken 5 database backups then first 3 backups are obsolete.


RMAN> report obsolete;

RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 2
Report of obsolete backups and copies
Type                 Key    Completion Time    Filename/Handle
-------------------- ------ ------------------ --------------------
Archive Log          1      30-DEC-11          H:\ORACLE\PRODUCT\FLASH_RECOVERY_AREA\FINANCE\ARCHIVE
LOG\2011_12_30\O1_MF_1_8_7HVVHLTV_.ARC
Archive Log          2      31-DEC-11          H:\ORACLE\PRODUCT\FLASH_RECOVERY_AREA\FINANCE\ARCHIVE
LOG\2011_12_31\O1_MF_1_9_7HX2XNFO_.ARC
Archive Log          3      31-DEC-11          H:\ORACLE\PRODUCT\FLASH_RECOVERY_AREA\FINANCE\ARCHIVE
LOG\2011_12_31\O1_MF_1_10_7HY178WB_.ARC
Archive Log          4      01-JAN-12          H:\ORACLE\PRODUCT\FLASH_RECOVERY_AREA\FINANCE\ARCHIVE
LOG\2012_01_01\O1_MF_1_11_7HYTDWTC_.ARC
Archive Log          5      01-JAN-12          H:\ORACLE\PRODUCT\FLASH_RECOVERY_AREA\FINANCE\ARCHIVE
LOG\2012_01_01\O1_MF_1_12_7HZVFGKL_.ARC
Archive Log          6      01-JAN-12          H:\ORACLE\PRODUCT\FLASH_RECOVERY_AREA\FINANCE\ARCHIVE
LOG\2012_01_01\O1_MF_1_13_7J02VNXS_.ARC
Archive Log          7      01-JAN-12          H:\ORACLE\PRODUCT\FLASH_RECOVERY_AREA\FINANCE\ARCHIVE
LOG\2012_01_01\O1_MF_1_14_7J0JD298_.ARC
Archive Log          8      02-JAN-12          H:\ORACLE\PRODUCT\FLASH_RECOVERY_AREA\FINANCE\ARCHIVE
LOG\2012_01_02\O1_MF_1_15_7J2CJVC7_.ARC
Archive Log          9      02-JAN-12          H:\ORACLE\PRODUCT\FLASH_RECOVERY_AREA\FINANCE\ARCHIVE
LOG\2012_01_02\O1_MF_1_16_7J3HK6H4_.ARC
Archive Log          10     06-JAN-12          H:\FINANCE\ARCH\ARC00027_0770941832.001
Archive Log          11     06-JAN-12          H:\FINANCE\ARCH\ARC00028_0770941832.001
Archive Log          12     06-JAN-12          H:\FINANCE\ARCH\ARC00029_0770941832.001
Archive Log          13     07-JAN-12          H:\FINANCE\ARCH\ARC00030_0770941832.001
Datafile Copy        2      08-JAN-12          H:\RMAN2\DATA_D-FINANCE_I-2590818756_TS-SYSTEM_FNO-1_
32N08GGJ.BKP
Backup Set           98     08-JAN-12
  Backup Piece       263    08-JAN-12          H:\RMAN\3MN08P58_8_1.BKP
Backup Set           98     08-JAN-12
  Backup Piece       262    08-JAN-12          H:\RMAN\3MN08P58_7_1.BKP
Backup Set           98     08-JAN-12
  Backup Piece       261    08-JAN-12          H:\RMAN\3MN08P58_6_1.BKP
Backup Set           98     08-JAN-12
  Backup Piece       260    08-JAN-12          H:\RMAN\3MN08P58_5_1.BKP
Backup Set           98     08-JAN-12
  Backup Piece       259    08-JAN-12          H:\RMAN\3MN08P58_4_1.BKP
Backup Set           98     08-JAN-12
  Backup Piece       258    08-JAN-12          H:\RMAN\3MN08P58_3_1.BKP
Backup Set           98     08-JAN-12
  Backup Piece       257    08-JAN-12          H:\RMAN\3MN08P58_2_1.BKP
Backup Set           98     08-JAN-12
  Backup Piece       256    08-JAN-12          H:\RMAN\3MN08P58_1_1.BKP
Backup Set           97     08-JAN-12
  Backup Piece       255    08-JAN-12          H:\RMAN2\3NN08P58_1_1.BKP
Backup Set           99     08-JAN-12
  Backup Piece       264    08-JAN-12          H:\RMAN\C-2590818756-20120108-14.CTL

RMAN> report obsolete redundancy 3;

Report of obsolete backups and copies
Type                 Key    Completion Time    Filename/Handle
-------------------- ------ ------------------ --------------------
Archive Log          1      30-DEC-11          H:\ORACLE\PRODUCT\FLASH_RECOVERY_AREA\FINANCE\ARCHIVE
LOG\2011_12_30\O1_MF_1_8_7HVVHLTV_.ARC
Archive Log          2      31-DEC-11          H:\ORACLE\PRODUCT\FLASH_RECOVERY_AREA\FINANCE\ARCHIVE
LOG\2011_12_31\O1_MF_1_9_7HX2XNFO_.ARC
Archive Log          3      31-DEC-11          H:\ORACLE\PRODUCT\FLASH_RECOVERY_AREA\FINANCE\ARCHIVE
LOG\2011_12_31\O1_MF_1_10_7HY178WB_.ARC
Archive Log          4      01-JAN-12          H:\ORACLE\PRODUCT\FLASH_RECOVERY_AREA\FINANCE\ARCHIVE
LOG\2012_01_01\O1_MF_1_11_7HYTDWTC_.ARC
Archive Log          5      01-JAN-12          H:\ORACLE\PRODUCT\FLASH_RECOVERY_AREA\FINANCE\ARCHIVE
LOG\2012_01_01\O1_MF_1_12_7HZVFGKL_.ARC
Archive Log          6      01-JAN-12          H:\ORACLE\PRODUCT\FLASH_RECOVERY_AREA\FINANCE\ARCHIVE
LOG\2012_01_01\O1_MF_1_13_7J02VNXS_.ARC
Archive Log          7      01-JAN-12          H:\ORACLE\PRODUCT\FLASH_RECOVERY_AREA\FINANCE\ARCHIVE
LOG\2012_01_01\O1_MF_1_14_7J0JD298_.ARC
Archive Log          8      02-JAN-12          H:\ORACLE\PRODUCT\FLASH_RECOVERY_AREA\FINANCE\ARCHIVE
LOG\2012_01_02\O1_MF_1_15_7J2CJVC7_.ARC
Archive Log          9      02-JAN-12          H:\ORACLE\PRODUCT\FLASH_RECOVERY_AREA\FINANCE\ARCHIVE
LOG\2012_01_02\O1_MF_1_16_7J3HK6H4_.ARC
Archive Log          10     06-JAN-12          H:\FINANCE\ARCH\ARC00027_0770941832.001
Archive Log          11     06-JAN-12          H:\FINANCE\ARCH\ARC00028_0770941832.001
Archive Log          12     06-JAN-12          H:\FINANCE\ARCH\ARC00029_0770941832.001
Archive Log          13     07-JAN-12          H:\FINANCE\ARCH\ARC00030_0770941832.001
Datafile Copy        2      08-JAN-12          H:\RMAN2\DATA_D-FINANCE_I-2590818756_TS-SYSTEM_FNO-1_
32N08GGJ.BKP

RMAN> report obsolete redundancy 5;

no obsolete backups found

RMAN> report obsolete redundancy 4;

no obsolete backups found

RMAN> show retention policy;

RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 2;

RMAN> report obsolete redundancy 3;

Report of obsolete backups and copies
Type                 Key    Completion Time    Filename/Handle
-------------------- ------ ------------------ --------------------
Archive Log          1      30-DEC-11          H:\ORACLE\PRODUCT\FLASH_RECOVERY_AREA\FINANCE\ARCHIVE
LOG\2011_12_30\O1_MF_1_8_7HVVHLTV_.ARC
Archive Log          2      31-DEC-11          H:\ORACLE\PRODUCT\FLASH_RECOVERY_AREA\FINANCE\ARCHIVE
LOG\2011_12_31\O1_MF_1_9_7HX2XNFO_.ARC
Archive Log          3      31-DEC-11          H:\ORACLE\PRODUCT\FLASH_RECOVERY_AREA\FINANCE\ARCHIVE
LOG\2011_12_31\O1_MF_1_10_7HY178WB_.ARC
Archive Log          4      01-JAN-12          H:\ORACLE\PRODUCT\FLASH_RECOVERY_AREA\FINANCE\ARCHIVE
LOG\2012_01_01\O1_MF_1_11_7HYTDWTC_.ARC
Archive Log          5      01-JAN-12          H:\ORACLE\PRODUCT\FLASH_RECOVERY_AREA\FINANCE\ARCHIVE
LOG\2012_01_01\O1_MF_1_12_7HZVFGKL_.ARC
Archive Log          6      01-JAN-12          H:\ORACLE\PRODUCT\FLASH_RECOVERY_AREA\FINANCE\ARCHIVE
LOG\2012_01_01\O1_MF_1_13_7J02VNXS_.ARC
Archive Log          7      01-JAN-12          H:\ORACLE\PRODUCT\FLASH_RECOVERY_AREA\FINANCE\ARCHIVE
LOG\2012_01_01\O1_MF_1_14_7J0JD298_.ARC
Archive Log          8      02-JAN-12          H:\ORACLE\PRODUCT\FLASH_RECOVERY_AREA\FINANCE\ARCHIVE
LOG\2012_01_02\O1_MF_1_15_7J2CJVC7_.ARC
Archive Log          9      02-JAN-12          H:\ORACLE\PRODUCT\FLASH_RECOVERY_AREA\FINANCE\ARCHIVE
LOG\2012_01_02\O1_MF_1_16_7J3HK6H4_.ARC
Archive Log          10     06-JAN-12          H:\FINANCE\ARCH\ARC00027_0770941832.001
Archive Log          11     06-JAN-12          H:\FINANCE\ARCH\ARC00028_0770941832.001
Archive Log          12     06-JAN-12          H:\FINANCE\ARCH\ARC00029_0770941832.001
Archive Log          13     07-JAN-12          H:\FINANCE\ARCH\ARC00030_0770941832.001
Datafile Copy        2      08-JAN-12          H:\RMAN2\DATA_D-FINANCE_I-2590818756_TS-SYSTEM_FNO-1_
32N08GGJ.BKP

RMAN> report obsolete recovery window of 3 days;

no obsolete backups found

RMAN> report obsolete recovery window of 2 days;

no obsolete backups found

RMAN> report obsolete recovery window of 1 days;

no obsolete backups found

No comments:

Post a Comment