Recover archive gaps

·         Manually Log Shipping (when the missing logs are very less approx. 15)
·         Performing Incremental Backup (When there is a very huge gap approx. 500)

r METHOD 1:

·         First, Find the archives which are missing by issuing the following command. This would give the gap sequences
 
    o   SQL> select * from v$archive_gap;
    o   SQL> select sequence#,process,status from v$managed_standby;
 
·         Now, Copy the logs to the standby site from the primary site
 
    o   [oracle@primary]$ scp                                                          log_file_name_n.arc oracle@standby:/log/file/location/log_file_name_n.arc
 
·         At standby site, Do the log file registration at the standby site until all the missing log files are registered
 
    o   SQL> alter database register logfile '/log/file/location/log_file_name_n.arc'; 

r METHOD 2:

·         Find the SCN difference, on both the database – Primary DB & Standby DB
 
    o   SQL> select current_scn from v$database;
 
·         Stop the managed standby apply process:
 
    o   SQL> alter database recover managed standby database cancel;
 
·         Shutdown the standby database
 
    o   SQL> shut immediate
 
·         On the primary, take an incremental backup from the SCN number where the standby has been stuck:
 
    o   RMAN> run {
              allocate channel c1 type disk format '/u01/backup/%U.bkp';
              backup incremental from scn ********* database;
              }

 
·         On the primary, create a new standby controlfile and copy this file to standby side:
 
    o   SQL> alter database create standby controlfile as '/u01/backup/for_standby.ctl';
    o   scp * oracle@standby: /u01/backup
 
·         Bring up the Standby instance in nomount mode:
 
    o   SQL> startup nomount
 
·         Replace the previous controlfile with this new one created at primary and bring the database to MOUNT state. (Because, this Primary Side control file has the information of the SCN and we have to perform the recovery using this controlfile)
 
    o   SQL> alter database mount standby database;
 
·         Open the RMAN prompt and catalog the backup piece. (Because RMAN does not know about these files yet, so you must let it know – by a process called cataloging)
 
    o   rman target /
    o   RMAN> catalog start with '/u01/backup';
 
·         Recover these files:
 
    o   RMAN> recover database;
 
·         After performing the recovery, exit RMAN and start managed recovery process:
 
    o   SQL> alter database recover managed standby database disconnect from                                     session;
 
·         Check the SCN’s in primary and standby to make sure that both are in SYNc:
 
    o   SQL> select current_scn from v$database;
 

Previous Post Next Post

نموذج الاتصال