2 Replies Latest reply: Nov 7, 2012 6:21 AM by tychos RSS

    RMAN Recovery failed after backup

    954965
      Here's what i did

      1. Backed up all datafiles: RMAN> BACKUP AS BACKUPSET DATAFILE <N>;
      then,
      2. RMAN> BACKUP ARCHIVELOG ALL NOT BACKED UP 1 TIMES;
      3. ALTER SYSTEM ARCHIVELOG CURRENT;

      To test restore and recovery ,

      1. SHUTDOWN IMMEDIATE

      I then deleted all datafiles and all onlinelogs in (SELECT MEMBER FROM V$LOGFILE)

      2. STARTUP MOUNT
      3. Restore all datafiles: RMAN> RESTORE DATAFILE <N>

      Finally,

      4. RECOVER DATABASE
      5. ALTER DATABASE OPEN RESETLOGS

      The database was not open however. I then tried

      6. ALTER DATABASE OPEN;

      Which gave the following error:

      ERROR at line 1:
      ORA-01113: file 1 needs media recovery

      7. ALTER DATABASE OPEN RESETLOGS:

      ERROR at line 1:
      ORA-01139: RESETLOGS option only valid after an incomplete database recovery

      So, after looking up online for a solution, i tried this:

      8. RECOVER DATABASE UNTIL CANCEL

      Specify log: suggested

      ORA-00308: cannot open archived log '+FRA'
      ORA-17503: ksfdpon:2 Failed to open file +FRA
      ORA-15045: ASM file name '+FRA' is not in reference form

      Anyway, i tried again:

      9. ALTER DATABASE OPEN RESETLOGS;

      Database altered.

      -----------------------------------------------------------

      Although the problem was fixed, i am still unsure of what was causing the error in the first place. Have i missed something in the Backup / Restore and Recovery process? And Why did i have to use 'RECOVER DATABASE UNTIL CANCEL' ?

      Here's the log file entry for the recovery operation:

      -----------------------------------------------------------

      starting media recovery

      archived log for thread 1 with sequence 4 is already on disk as file +FRA/orcl/archivelog/2012_11_07/thread_1_seq_4.282.798717805
      archived log for thread 1 with sequence 5 is already on disk as file +FRA/orcl/archivelog/2012_11_07/thread_1_seq_5.283.798718157
      archived log file name=+FRA/orcl/archivelog/2012_11_07/thread_1_seq_4.282.798717805 thread=1 sequence=4
      archived log file name=+FRA/orcl/archivelog/2012_11_07/thread_1_seq_5.283.798718157 thread=1 sequence=5
      RMAN-00571: ===========================================================
      RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
      RMAN-00571: ===========================================================
      RMAN-03002: failure of recover command at 11/07/2012 10:25:11
      ORA-00283: recovery session canceled due to errors
      RMAN-11003: failure during parse/execution of SQL statement: alter database recover logfile '+FRA/orcl/archivelog/2012_11_07/thread_1_seq_5.283.798718157'
      ORA-00283: recovery session canceled due to errors
      ORA-00313: open failed for members of log group 3 of thread 1
      ORA-00312: online log 3 thread 1: '+FRA/orcl/onlinelog/group_3.259.798663155'
      ORA-17503: ksfdopn:2 Failed to open file +FRA/orcl/onlinelog/group_3.259.798663155
      ORA-15012: ASM file '+FRA/orcl/onlinelog/group_3.259.798663155' does not exist
      ORA-00312: online log 3 thread 1: '+DATA/orcl/onlinelog/group_3.263.798663151'
      ORA-17503: ksfdopn:2 Failed to open file +DATA/orcl/onlinelog/group_3.263.798663

      Recovery Manager complete.

      ---------------------------------------------------------------------------------------
        • 1. Re: RMAN Recovery failed after backup
          Mahir M. Quluzade
          Hi,

          I think this is help you.

          RMAN> run
          {
          restore database;
          recover database;
          sql 'alter database open';
          }


          Regards
          Mahir M. Quluzade
          www.mahir-quluzade.com
          • 2. Re: RMAN Recovery failed after backup
            tychos
            Hi 951962,
            The command in step 4
            RECOVER DATABASE
            Should have resulted in the same output as the command in step 8
            RECOVER DATABASE UNTIL CANCEL
            Can you confirm or deny with the screen output of step 4?
            To me it looks like the command in step 4 did not run (but maybe you have screen output or you can check the alert log to see it did.)
            Which resulted in the error:
            ORA-01113: file 1 needs media recovery
            As the recovery was not executed.
            Only in step 8 you executed a recover leading to s succesful "alter database open resetlogs".
            Regards,
            Tycho