Wednesday 28 August 2013

Manually apply log to standby in 11g

First copy the log from to standby log location i.e in my case flash recovery area >instance name

then cancel the log at standby by following command
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;


  1. Start up and mount the standby database (if it is not already mounted). For example, enter:
    SQL> STARTUP MOUNT PFILE=/oracle/admin/pfile/initSTBY.ora
    
  2. Recover the database using the AUTOMATIC option:
    SQL> ALTER DATABASE RECOVER AUTOMATIC STANDBY DATABASE;
    
    The AUTOMATIC option automatically generates the name of the next archived redo log file needed to continue the recovery operation.
    After recovering the available log files, the Oracle database prompts for the name of a log file that does not exist. For example, you might see:
    ORA-00308: cannot open archived log '/oracle/standby/standby_logs/arcr_1_540.arc'
    ORA-27037: unable to obtain file status
    SVR4 Error: 2: No such file or directory
    Additional information: 3
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    
  3. Cancel recovery after the Oracle database applies the available log files by typing CTRL/C:
    SQL> <CTRL/C>
    Media recovery cancelled.
    
    The following error messages are acceptable after recovery cancellation and do not indicate a problem:
    ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
    ORA-01194: file 1 needs more recovery to be consistent
    ORA-01110: data file 1: 'some_filename'
    ORA-01112: media recovery not started
    
  4. After you finish manually applying the missing log file, you can restart log apply services on the standby database, as follows:
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;

No comments:

Post a Comment