Sunday, April 15, 2018

RMAN-06207, RMAN-06208 & RMAN-06214

Error:

RMAN-06207: WARNING: 3 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: Datafile Copy   /backup/export/RDA/rda/output/TMP_RDA/RDA_BR_T11238_01_control.tmp
RMAN-06214: Datafile Copy   /backup/export/control_before.ctl


Cause:

These files will not be present at the OS level but the repository has the entry for it.

[oracle@mac01 /backup]$ ls -ltrh /backup/export/control_before.ctl
mv: cannot stat `/backup/export/control_before.ctl': No such file or directory
[oracle@mac01 /backup]$

[oracle@mac01 /backup]$ ls -ltrh /backup/export/RDA/rda/output/TMP_RDA/RDA_BR_T11238_01_control.tmp
mv: cannot stat `/backup/export/RDA/rda/output/TMP_RDA/RDA_BR_T11238_01_control.tmp': No such file or directory
[oracle@mac01 /backup]$


Solution:

Update the repository for those backupsets/files through “CROSSCHECK” command.

  1. Check for the obsolete backupsets/files for the database.

RMAN> report obsolete;

RMAN retention policy will be applied to the command
RMAN retention policy is set to recovery window of 14 days
Report of obsolete backups and copies
Type                 Key    Completion Time    Filename/Handle
-------------------- ------ ------------------ --------------------
Control File Copy     14     31-JAN-13          /backup/export/RDA/rda/output/TMP_RDA/RDA_BR_T11238_01_control.tmp
Control File Copy     15     10-FEB-14          /backup/export/control_before.ctl

RMAN>

  1. Execute “CROSSCHECK” command to update the RMAN repository. In my case, it is the Control file copies are obsolete.

RMAN> crosscheck controlfilecopy '/backup/export/control_before.ctl';

released channel: ORA_DISK_1
released channel: ORA_DISK_2
released channel: ORA_DISK_3
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=592 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=1027 device type=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: SID=1093 device type=DISK
validation failed for control file copy
control file copy file name=/backup/export/control_before.ctl RECID=15 STAMP=839184488
Crosschecked 1 objects


RMAN> crosscheck controlfilecopy '/backup/export/RDA/rda/output/TMP_RDA/RDA_BR_T11238_01_control.tmp';

released channel: ORA_DISK_1
released channel: ORA_DISK_2
released channel: ORA_DISK_3
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=592 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=1027 device type=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: SID=1093 device type=DISK
validation failed for control file copy
control file copy file name=/backup/export/RDA/rda/output/TMP_RDA/RDA_BR_T11238_01_control.tmp RECID=14 STAMP=806121752
Crosschecked 1 objects


RMAN>

You can use anyone among the below, based on the type of file reported as obsolete.

Backup piece     à CROSSCHECK BACKUPPIECE ‘<BACKUPPIECE_NAME>’;
Backupset          à CROSSCHECK BACKUPSET ‘<BACKUPSET_NAME>’;
Datafilecopy      à CROSSCHECK DATAFILECOPY ‘<DATAFILECOPY_NAME>’;
Backup               à CROSSCHECK BACKUP;          


  1. Delete the obsolete backupset/files.

RMAN> delete obsolete;

RMAN retention policy will be applied to the command
RMAN retention policy is set to recovery window of 14 days
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
Deleting the following obsolete backups and copies:
Type                 Key    Completion Time    Filename/Handle
-------------------- ------ ------------------ --------------------
Control File Copy     14     31-JAN-13          /backup/export/RDA/rda/output/TMP_RDA/RDA_BR_T11238_01_control.tmp
Control File Copy     15     10-FEB-14          /backup/export/control_before.ctl

Do you really want to delete the above objects (enter YES or NO)? YES
deleted control file copy
control file copy file name=/backup/export/RDA/rda/output/TMP_RDA/RDA_BR_T11238_01_control.tmp RECID=14 STAMP=806121752
deleted control file copy
control file copy file name=/backup/export/control_before.ctl RECID=15 STAMP=839184488
Deleted 2 objects

RMAN>

  1. Verify that there are no obsolete backupset/files.
RMAN> report obsolete;

RMAN retention policy will be applied to the command
RMAN retention policy is set to recovery window of 14 days
no obsolete backups found

RMAN>


Hope this helps!!!



No comments:

Post a Comment