9 Replies Latest reply: Mar 28, 2013 12:39 PM by KR10822864 RSS

    RMAN-Dataguard incremental catch up question

    oralicious
      If a dataguard standby database gets out of synch by any lengthy duration, theres a known method for syncing it up by getting an incremental backup from primary from the last SCN applied and recovering the standby with it.

      http://docs.oracle.com/cd/B28359_01/server.111/b28294/rman.htm#CIHIAADC

      Question is do we have any limitations on how far back an incremental SCN backup be ran on the primary.

      Also interested to hear any user experiences to look out for using the scn recovery method for standbys.
        • 1. Re: RMAN-Dataguard incremental catch up question
          KR10822864
          >
          Question is do we have any limitations on how far back an incremental SCN backup be ran on the primary.
          according to my knowldge , NO
          Also interested to hear any user experiences to look out for using the scn recovery method for standbys.
          NO

          According oracle documentation, if standby goes huge number of archivelogs gap w.r.t primary, its better to recreate standby using incremental backup from primary.rather than tranfering huge number of arch files from primary to standby(arc file size will be matters in this situation ...if it is huge and Also, there is a potential chance of archive log non-availability, which may lead to rebuild of standby database).

          Edited by: KR10822864 on Mar 28, 2013 5:13 AM

          Edited by: KR10822864 on Mar 28, 2013 5:15 AM
          • 2. Re: RMAN-Dataguard incremental catch up question
            Mahir M. Quluzade
            Hi!

            When we are using RMAN Incremental Backups to Roll Forward a Physical Standby Database?
            - If we have a archive gap.
            When occurs archive gap?
            - Archive gap occurs when not transported archived redo log is deleted.

            I think, if we are monitoring our data guard every day, then we have not archive gap, if our database backup strategy is true.

            If we have any backup, then we can restore archive logs, and data guard automatic solution redo gap is this case.

            If we haven't any backup of our missing or corrupted archived redo log, then best practice is using incremental backups to roll forward a physical standby database.
            If your database is small database then you can recreate standby database again.
            But if your database is very large database then roll forward standby database with incremental backup is best practice.

            Mahir M. Quluzade
            http://www.mahir-quluzade.com
            • 3. Re: RMAN-Dataguard incremental catch up question
              oralicious
              i have specific reason for asking. Our DR site will be used some times during year when link from primary will be disconnected. I can put standby into snapshot mode for only short period of time due to space restriction on the flashback logs and arc log backups. database is several terabytes and can have 4-500 gb of arc logs per day. takes too long to catch up when I put DB back into physical mode so incremental recovery is the way forward.

              to leave the database in standby mode (either snapshot or physical) means logging must remain so I cant turn off the logs which means Im manually clearing down logs on the standby site for anything up to 7-10 days.

              My other way to do it is to open the standby in primary mode but Ive lost it then and need to fully rebuild which I want to avoid due to DB size.
              • 4. Re: RMAN-Dataguard incremental catch up question
                Justin_Mungal
                KR10822864 wrote:
                Question is do we have any limitations on how far back an incremental SCN backup be ran on the primary.
                according to my knowldge , NO
                The command will still run. It will just do a full backup.
                RMAN> backup incremental from scn 0000001 database format '/tmp/ForStandby_%U';
                
                Starting backup at 27-MAR-13
                
                using channel ORA_DISK_1
                backup will be obsolete on date 03-APR-13
                archived logs will not be kept or backed up
                *channel ORA_DISK_1: starting full datafile backup set*
                channel ORA_DISK_1: specifying datafile(s) in backup set
                input datafile file number=00002 name=/u01/app/oracle/oradata/ORCL/datafile/o1_mf_sysaux_8mtw4l2s_.dbf
                input datafile file number=00001 name=/u01/app/oracle/oradata/ORCL/datafile/o1_mf_system_8nqos6ng_.dbf
                input datafile file number=00004 name=/u01/app/oracle/oradata/ORCL/datafile/o1_mf_users_8mtw4l3h_.dbf
                input datafile file number=00003 name=/u01/app/oracle/oradata/ORCL/datafile/o1_mf_undotbs1_8mtw4l2x_.dbf
                input datafile file number=00005 name=/u01/app/oracle/oradata/ORCL/datafile/o1_mf_justin_8mtx19z1_.dbf
                channel ORA_DISK_1: starting piece 1 at 27-MAR-13
                channel ORA_DISK_1: finished piece 1 at 27-MAR-13
                piece handle=/tmp/ForStandby_0eo5hj16_1_1 tag=TAG20130327T004318 comment=NONE
                channel ORA_DISK_1: backup set complete, elapsed time: 00:01:05
                
                using channel ORA_DISK_1
                backup will be obsolete on date 03-APR-13
                archived logs will not be kept or backed up
                *channel ORA_DISK_1: starting full datafile backup set*
                channel ORA_DISK_1: specifying datafile(s) in backup set
                including current control file in backup set
                channel ORA_DISK_1: starting piece 1 at 27-MAR-13
                channel ORA_DISK_1: finished piece 1 at 27-MAR-13
                piece handle=/tmp/ForStandby_0fo5hj37_1_1 tag=TAG20130327T004318 comment=NONE
                channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
                Finished backup at 27-MAR-13
                • 5. Re: RMAN-Dataguard incremental catch up question
                  Justin_Mungal
                  Just a guess at how this is working - Oracle is checking block headers to see if they have changed since the SCN specified, and dumps them if they have. That is why this isn't a normal level 1 backup, and why it can't be used in normal recovery.

                  Edited by: Justin Mungal on Mar 28, 2013 8:06 AM
                  • 6. Re: RMAN-Dataguard incremental catch up question
                    Mahir M. Quluzade
                    When you are convert physical standby database to snapshot. Archive redo logs received by standby database
                    but don't applling. I understand you have not free space for archive logs and flashback logs. Then I think
                    best way increase size fast recovery area and continue using snapshot standby database.

                    Thanks
                    Mahir M. Quluzade
                    • 7. Re: RMAN-Dataguard incremental catch up question
                      KR10822864
                      Justin Mungal wrote:
                      KR10822864 wrote:
                      Question is do we have any limitations on how far back an incremental SCN backup be ran on the primary.
                      according to my knowldge , NO
                      The command will still run. It will just do a full backup.
                      RMAN> backup incremental from scn 0000001 database format '/tmp/ForStandby_%U';
                      
                      Starting backup at 27-MAR-13
                      
                      using channel ORA_DISK_1
                      backup will be obsolete on date 03-APR-13
                      archived logs will not be kept or backed up
                      *channel ORA_DISK_1: starting full datafile backup set*
                      channel ORA_DISK_1: specifying datafile(s) in backup set
                      input datafile file number=00002 name=/u01/app/oracle/oradata/ORCL/datafile/o1_mf_sysaux_8mtw4l2s_.dbf
                      input datafile file number=00001 name=/u01/app/oracle/oradata/ORCL/datafile/o1_mf_system_8nqos6ng_.dbf
                      input datafile file number=00004 name=/u01/app/oracle/oradata/ORCL/datafile/o1_mf_users_8mtw4l3h_.dbf
                      input datafile file number=00003 name=/u01/app/oracle/oradata/ORCL/datafile/o1_mf_undotbs1_8mtw4l2x_.dbf
                      input datafile file number=00005 name=/u01/app/oracle/oradata/ORCL/datafile/o1_mf_justin_8mtx19z1_.dbf
                      channel ORA_DISK_1: starting piece 1 at 27-MAR-13
                      channel ORA_DISK_1: finished piece 1 at 27-MAR-13
                      piece handle=/tmp/ForStandby_0eo5hj16_1_1 tag=TAG20130327T004318 comment=NONE
                      channel ORA_DISK_1: backup set complete, elapsed time: 00:01:05
                      
                      using channel ORA_DISK_1
                      backup will be obsolete on date 03-APR-13
                      archived logs will not be kept or backed up
                      *channel ORA_DISK_1: starting full datafile backup set*
                      channel ORA_DISK_1: specifying datafile(s) in backup set
                      including current control file in backup set
                      channel ORA_DISK_1: starting piece 1 at 27-MAR-13
                      channel ORA_DISK_1: finished piece 1 at 27-MAR-13
                      piece handle=/tmp/ForStandby_0fo5hj37_1_1 tag=TAG20130327T004318 comment=NONE
                      channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
                      Finished backup at 27-MAR-13
                      SQL> SELECT CURRENT_SCN FROM V$DATABASE;
                      xxxxx
                      SQL> select min(fhscn) from x$kcvfh;
                      xxxxx
                      according to oracle documentaion above 2 queries will return the almost same SCN(at standby side not primary side).
                      however if there is huge difference its better to take backup using the SCN from second query lesser SCN.
                      On the primary database – create the needed incremental backup from the above SCN

                      $rman target /
                      RMAN> BACKUP DEVICE TYPE DISK INCREMENTAL FROM SCN xxxxx DATABASE FORMAT ‘/u01/bkp_%U’;

                      it wont take full backup.hope it will clarify your Q.
                      • 8. Re: RMAN-Dataguard incremental catch up question
                        Justin_Mungal
                        KR10822864 wrote:
                        Justin Mungal wrote:
                        KR10822864 wrote:
                        Question is do we have any limitations on how far back an incremental SCN backup be ran on the primary.
                        according to my knowldge , NO
                        The command will still run. It will just do a full backup.
                        RMAN> backup incremental from scn 0000001 database format '/tmp/ForStandby_%U';
                        
                        Starting backup at 27-MAR-13
                        
                        using channel ORA_DISK_1
                        backup will be obsolete on date 03-APR-13
                        archived logs will not be kept or backed up
                        *channel ORA_DISK_1: starting full datafile backup set*
                        channel ORA_DISK_1: specifying datafile(s) in backup set
                        input datafile file number=00002 name=/u01/app/oracle/oradata/ORCL/datafile/o1_mf_sysaux_8mtw4l2s_.dbf
                        input datafile file number=00001 name=/u01/app/oracle/oradata/ORCL/datafile/o1_mf_system_8nqos6ng_.dbf
                        input datafile file number=00004 name=/u01/app/oracle/oradata/ORCL/datafile/o1_mf_users_8mtw4l3h_.dbf
                        input datafile file number=00003 name=/u01/app/oracle/oradata/ORCL/datafile/o1_mf_undotbs1_8mtw4l2x_.dbf
                        input datafile file number=00005 name=/u01/app/oracle/oradata/ORCL/datafile/o1_mf_justin_8mtx19z1_.dbf
                        channel ORA_DISK_1: starting piece 1 at 27-MAR-13
                        channel ORA_DISK_1: finished piece 1 at 27-MAR-13
                        piece handle=/tmp/ForStandby_0eo5hj16_1_1 tag=TAG20130327T004318 comment=NONE
                        channel ORA_DISK_1: backup set complete, elapsed time: 00:01:05
                        
                        using channel ORA_DISK_1
                        backup will be obsolete on date 03-APR-13
                        archived logs will not be kept or backed up
                        *channel ORA_DISK_1: starting full datafile backup set*
                        channel ORA_DISK_1: specifying datafile(s) in backup set
                        including current control file in backup set
                        channel ORA_DISK_1: starting piece 1 at 27-MAR-13
                        channel ORA_DISK_1: finished piece 1 at 27-MAR-13
                        piece handle=/tmp/ForStandby_0fo5hj37_1_1 tag=TAG20130327T004318 comment=NONE
                        channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
                        Finished backup at 27-MAR-13
                        SQL> SELECT CURRENT_SCN FROM V$DATABASE;
                        xxxxx
                        SQL> select min(fhscn) from x$kcvfh;
                        xxxxx
                        according to oracle documentaion above 2 queries will return the almost same SCN(at standby side not primary side).
                        however if there is huge difference its better to take backup using the SCN from second query lesser SCN.
                        On the primary database – create the needed incremental backup from the above SCN

                        $rman target /
                        RMAN> BACKUP DEVICE TYPE DISK INCREMENTAL FROM SCN xxxxx DATABASE FORMAT ‘/u01/bkp_%U’;

                        it wont take full backup.hope it will clarify your Q.
                        All I was saying was that there is no direct limit to the SCN that can be used in the command, in response to the OP's question.

                        Edited by: Justin Mungal on Mar 28, 2013 8:57 AM - meant to say, "no limit."
                        • 9. Re: RMAN-Dataguard incremental catch up question
                          KR10822864
                          Justin Mungal wrote:
                          KR10822864 wrote:
                          Justin Mungal wrote:
                          KR10822864 wrote:
                          Question is do we have any limitations on how far back an incremental SCN backup be ran on the primary.
                          according to my knowldge , NO
                          The command will still run. It will just do a full backup.
                          RMAN> backup incremental from scn 0000001 database format '/tmp/ForStandby_%U';
                          
                          Starting backup at 27-MAR-13
                          
                          using channel ORA_DISK_1
                          backup will be obsolete on date 03-APR-13
                          archived logs will not be kept or backed up
                          *channel ORA_DISK_1: starting full datafile backup set*
                          channel ORA_DISK_1: specifying datafile(s) in backup set
                          input datafile file number=00002 name=/u01/app/oracle/oradata/ORCL/datafile/o1_mf_sysaux_8mtw4l2s_.dbf
                          input datafile file number=00001 name=/u01/app/oracle/oradata/ORCL/datafile/o1_mf_system_8nqos6ng_.dbf
                          input datafile file number=00004 name=/u01/app/oracle/oradata/ORCL/datafile/o1_mf_users_8mtw4l3h_.dbf
                          input datafile file number=00003 name=/u01/app/oracle/oradata/ORCL/datafile/o1_mf_undotbs1_8mtw4l2x_.dbf
                          input datafile file number=00005 name=/u01/app/oracle/oradata/ORCL/datafile/o1_mf_justin_8mtx19z1_.dbf
                          channel ORA_DISK_1: starting piece 1 at 27-MAR-13
                          channel ORA_DISK_1: finished piece 1 at 27-MAR-13
                          piece handle=/tmp/ForStandby_0eo5hj16_1_1 tag=TAG20130327T004318 comment=NONE
                          channel ORA_DISK_1: backup set complete, elapsed time: 00:01:05
                          
                          using channel ORA_DISK_1
                          backup will be obsolete on date 03-APR-13
                          archived logs will not be kept or backed up
                          *channel ORA_DISK_1: starting full datafile backup set*
                          channel ORA_DISK_1: specifying datafile(s) in backup set
                          including current control file in backup set
                          channel ORA_DISK_1: starting piece 1 at 27-MAR-13
                          channel ORA_DISK_1: finished piece 1 at 27-MAR-13
                          piece handle=/tmp/ForStandby_0fo5hj37_1_1 tag=TAG20130327T004318 comment=NONE
                          channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
                          Finished backup at 27-MAR-13
                          SQL> SELECT CURRENT_SCN FROM V$DATABASE;
                          xxxxx
                          SQL> select min(fhscn) from x$kcvfh;
                          xxxxx
                          according to oracle documentaion above 2 queries will return the almost same SCN(at standby side not primary side).
                          however if there is huge difference its better to take backup using the SCN from second query lesser SCN.
                          On the primary database – create the needed incremental backup from the above SCN

                          $rman target /
                          RMAN> BACKUP DEVICE TYPE DISK INCREMENTAL FROM SCN xxxxx DATABASE FORMAT ‘/u01/bkp_%U’;

                          it wont take full backup.hope it will clarify your Q.
                          All I was saying was that there is no direct limit to the SCN that can be used in the command, in response to the OP's question.

                          Edited by: Justin Mungal on Mar 28, 2013 8:57 AM - meant to say, "no limit."
                          yes no limt.