1 2 Previous Next 19 Replies Latest reply: Dec 11, 2012 5:32 AM by Varma Go to original post RSS
      • 15. Re: Oracle Dataguard - Logs apply issue
        DBA 24*7
        To recover a standby database:
        1. Manually copy all miissing archive log files from primary to standby server

        2. ) Cancel managed recovery on standby database:

        alter databae recover managed standby database cancel;
        3.) Recover automatically:

        recover automatic standy database;
        4.) switch back to managed standby

        recover managed standby database disconnect;

        OR..

        Manually Resolving a Gap:
        =============================

        In some rare cases it might be necessary to manually resolve gaps. The following section describes how to query the appropriate views to determine if a gap exists.

        On your physical standby database:
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

        Query the V$ARCHIVE_GAP view:

        SQL> SELECT * FROM V$ARCHIVE_GAP;

        THREAD# LOW_SEQUENCE# HIGH_SEQUENCE#
        ----------- ------------- --------------
        1 333 336

        The query results show that your physical standby database is currently missing logs from sequence 333 to sequence 336 for thread 1. After you identify the gap, issue the following SQL statement on the primary database to locate the archived redo logs on your primary database:

        SQL> SELECT NAME FROM V$ARCHIVED_LOG WHERE THREAD#=1 AND DEST_ID=1 AND
        2> SEQUENCE# BETWEEN 333 AND 336;

        NAME
        --------------------------------------------------------------------------------
        /u01/oradata/arch/arch_1_333.arc
        /u01/oradata/arch/arch_1_334.arc
        /u01/oradata/arch/arch_1_335.arc

        Copy the logs returned by the query to your physical standby database and register using the ALTER DATABASE REGISTER LOGFILE command.

        SQL> ALTER DATABASE REGISTER LOGFILE
        '/u01/oradata/stby/arch/arch_1_333.arc';
        SQL> ALTER DATABASE REGISTER LOGFILE
        '/u01/oradata/stby/arch/arch_1_334.arc';
        SQL> ALTER DATABASE REGISTER LOGFILE
        '/u01/oradata/stby/arch/arch_1_335.arc';

        Once the log files have been registered in the standby controlfile, you can restart the MRP process and the standby database will 'catch up' with the the log gaps or you can manually recover the standby database.
        • 16. Re: Oracle Dataguard - Logs apply issue
          DBA 24*7
          Agreed with CKPT.
          • 17. Re: Oracle Dataguard - Logs apply issue
            733436
            ok,
            I will close the thread once this is resolved.
            Thanks for your help.
            • 18. Re: Oracle Dataguard - Logs apply issue
              979142
              Hi,

              I have one question for this post,

              How will you able to resolve the gap sequences if there are more files[Ex: 5000] are missing in the standby db?

              Thanks,
              Siva
              • 19. Re: Oracle Dataguard - Logs apply issue
                Varma
                Hi,

                Use Rman Incremental backup(Using Scn).
                1 2 Previous Next