Encountering various RMAN-XXXX errors after graceful Switchover or Failover on new primary database when trying to run backup.
Problem Details
Problem Statement
Encountering various RMAN-XXXX errors after graceful Switchover or Failover on new primary database when trying to run regular backup
Applicable Error Codes
RMAN-03002: failure of backup command at 05/21/2013
RMAN-06059: expected archived log not found, loss of archived log compromises recoverability
ORA-19625: error identifying file xxx.arc
ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory
Affected Versions
Version independent
Affected Platforms
Platform independent
The problem appears due to the fact that standby controlfile is a copy of primary datafile (which contains all backup locations as they were done on primary server) and hence new primary database controlfile may contain obsolete information about backups archivelogs, datafile copies, settings etc...
To resolve the issues, it is necessary to manually crosscheck all database entities in RMAN:
RMAN> CROSSCHECK BACKUP;
RMAN> CROSSCHECK ARCHIVELOG ALL;
RMAN> CROSSCHECK COPY OF DATABASE;
RMAN> CROSSCHECK COPY;
RMAN> SHOW ALL;
And adjust as needed, for example:
RMAN> CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u05/app/oracle/dbs/snapcf_PROD.f';
Finally, in order for your backups to work normally, you should catalog all accessible archivelogs and existing backups on the new primary server, for example:
RMAN> CATALOG START WITH '/u01/app/oracle/dbvisit_arch/PROD';
RMAN> CATALOG START WITH '/backups/PROD';
RMAN> CATALOG DATAFILECOPY '/backup/copy/O1_MF_DATA_X.DBF' LEVEL 0 TAG='DB_COPY';
RMAN> CATALOG BACKUPPIECE '/backup/backupset/2018_07_25/O1_MF_DB_COPY_X.BKP;
NOTE: the catalog makes sense and should be perfromed only after switchover as after Failover there will be resetlogs = new database incarnation, making all old archivelogs / backup obsolete.
Comments