7.5 C
Vancouver
Thursday, November 21, 2024

RMAN: Use CROSSCHECK command to fix status

Must read

What to do when an obsolete rman object can’t be found.

Environment

Make sure ORACLE_HOME, ORACLE_SID and PATH are set correctly

– rman also comes with X11R6 so make sure that ORACLE_HOME/bin is first in your PATH

Log Into RMAN

rman target /

Find the mismatched objects

RMAN> delete noprompt obsolete;

RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 2
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=18 devtype=DISK
Deleting the following obsolete backups and copies:
Type                 Key    Completion Time    Filename/Handle
-------------------- ------ ------------------ --------------------
Backup Set           1681   01-FEB-10         
  Backup Piece       1681   01-FEB-10          /usr/lib/oracle/xe/app/oracle/flash_recovery_area/XE/backupset/2010_02_01/o1_mf_nnndf_TAG20100201T040227_5pfjpoo0_.bkp

RMAN-06207: WARNING: 1 objects could not be deleted for DISK channel(s) due
RMAN-06208:          to mismatched status.  Use CROSSCHECK command to fix status
RMAN-06210: List of Mismatched objects
RMAN-06211: ==========================
RMAN-06212:   Object Type   Filename/Handle
RMAN-06213: --------------- ---------------------------------------------------
RMAN-06214: Backup Piece    /usr/lib/oracle/xe/app/oracle/flash_recovery_area/XE/backupset/2010_02_01/o1_mf_nnndf_TAG20100201T040227_5pfjpoo0_.bkp

 

The /usr/lib/oracle/xe/app/oracle/flash_recovery_area/XE/backupset/2010_02_01/o1_mf_nnndf_TAG20100201T040227_5pfjpoo0_.bkp file is missing.

Run CROSSCHECK to set its status

RMAN> crosscheck backuppiece ‘/usr/lib/oracle/xe/app/oracle/flash_recovery_area/XE/backupset/2010_02_01/o1_mf_nnndf_TAG20100201T040227_5pfjpoo0_.bkp’ ;

using channel ORA_DISK_1
crosschecked backup piece: found to be 'EXPIRED'
backup piece handle=/usr/lib/oracle/xe/app/oracle/flash_recovery_area/XE/backupset/2010_02_01/o1_mf_nnndf_TAG20100201T040227_5pfjpoo0_.bkp recid=1681 stamp=709790549
Crosschecked 1 objects

 

Now delete the objects

RMAN> delete noprompt obsolete;

RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 2
using channel ORA_DISK_1
Deleting the following obsolete backups and copies:
Type                 Key    Completion Time    Filename/Handle
-------------------- ------ ------------------ --------------------
Backup Set           1681   01-FEB-10         
  Backup Piece       1681   01-FEB-10          /usr/lib/oracle/xe/app/oracle/flash_recovery_area/XE/backupset/2010_02_01/o1_mf_nnndf_TAG20100201T040227_5pfjpoo0_.bkp

deleted backup piece
backup piece handle=/usr/lib/oracle/xe/app/oracle/flash_recovery_area/XE/backupset/2010_02_01/o1_mf_nnndf_TAG20100201T040227_5pfjpoo0_.bkp recid=1681 stamp=709790549
Deleted 1 objects

 

More articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest article