4 Replies Latest reply: May 25, 2012 1:32 AM by user10724679 RSS

    Resolving archive log gaps in Oracle 9i


      I have a scenario where some archive log gaps are generated since my team mates didn't notice that standby database was down. Now i have logged in to standby server and mounted the database and started the recovery process...

      In primary totally 207 logs. In standby db,logs are applying after i am restarting the archive process in primary but logs 201-204 are missing/not applied in standby. From 207 the logs are in sync for both primary and standby. I have checked in the primary database server archive log location, the logs 202-204 are backed up by rman. Now how can I restore those missing logs from RMAN to the standby server and apply them.

      Db version: Oracle 9i
      Platform: Windows server 2003
      Rman: Catalog database
        • 1. Re: Resolving archive log gaps in Oracle 9i

          I think you need to do this with RMAN :

          restore archivelog from logseq = 701 until logseq = 701;

          run {
                   allocate channel t1 type 'sbt_tape';
                   # Set the destination if you want it to be recovered into
                   # different location. By default it would be restored to 
                   # the default location
                   set archivelog destination to '/u01/app/oracle/temp_restore';
                   restore archivelog from logseq 200 until logseq 300;
                   release channel t1;
          Once you have the Archive check out this document :


          B.3 Resolving Archive Gaps Manually

          RMAN restore Oracle 9


          Best Regards

          • 2. Re: Resolving archive log gaps in Oracle 9i
            Thanks for your reply mseberg. But since in my case logs starting from 205 are applied what will happen if i restore the missing logs 201-205 and start sync. Will the logs from 205 will again apply or there will be a mess.
            • 3. Re: Resolving archive log gaps in Oracle 9i
              Hello again;

              The logs will not apply twice. Oracle will bark and throw an error letting you know the log has already been applied.

              But that's why I put the manual apply link in, so you can control ( with a script I'm thinking), which once to apply.

              Best Regards

              • 4. Re: Resolving archive log gaps in Oracle 9i
                How to backup database using SCN. I have been trying with the below command but its not working.
                backup incremental FROM SCN 774823858 tag 'standby' database format 'd:\oracle\standby2_%U';