1 2 Previous Next 15 Replies Latest reply on Jan 30, 2019 6:12 AM by 3510875

    rman duplicate

    3510875

      Hi Support,

       

      Need your suggestion

       

      Oracle says "If CONFIGURE CONTROLFILE AUTOBACKUP is ON, then RMAN automatically backs up the control file and the current server parameter file (if used to start up the database) at the end of a successful BACKUP command."

      Can we use this backup of control file for rman duplicate?

      It seems control file should be backed up in the middle of the full backup,i mean after datafile backup complets and before archivelog backup begins.But above note says,it is backed up at the end of the successfull backup.

       

       

      Thank you

        • 1. Re: rman duplicate
          CristianR-Oracle

          Short answer: Yes, it can be used

           

          Now, how are you duplicating the database, what command?

          • 2. Re: rman duplicate
            top.gun

            You can restore the controlfile from any recent backupset, including autobackup, or use an image copy of the controlfile.

            Just ensure the backupset or image copy is taken at the completion of your last full database backup.

            • 3. Re: rman duplicate
              3510875

              Hi support,

               

              If control file was backedup at end of the backup,then the checkpoint_change# scn will be higher than the last archivelog scn right?in this case it will request for more archivelogs?

               

              we are using duplicate target database to dev backup location '/u02/backup'

              • 4. Re: rman duplicate
                rugbyRCT

                hi,

                 

                    You may compare yours SCN between archivelog and control file by these next queries :

                by RMAN : the date is your just before last backup

                 

                LIST BACKUP OF DATABASE archivelog all completed AFTER "TO_DATE('26/01/2019 00:00:00','DD/MM/YYHH24:MI:SS')";

                LIST BACKUPSET of controlfile completed AFTER "TO_DATE('26/01/2019 00:00:00','DD/MM/YYHH24:MI:SS')";

                 

                then after you could compare yours scn.

                 

                regards

                JP

                • 5. Re: rman duplicate
                  Dude!

                  RMAN always includes the spfile and controlfile when your backup includes the system tablespace.

                   

                  CONFIGURE CONTROLFILE AUTOBACKUP makes sure:

                   

                  a) you always have a controlfile backup when there are structural database changes.

                      (This is very important to be able to restore a deleted tablespace, since you need a controlfile prior to the deletion).

                  b) It simplifies the process of restoring the controlfile.

                   

                  For example:

                   

                  RMAN> restore spfile from autobackup  db_recovery_file_dest='/u03/fast_recovery_area' db_name='ORCL'; 

                  RMAN> restore controlfile from autobackup

                   

                  Otherwise, you need a RMAN catalog database or specify the RMAN backupset filename:

                   

                  RMAN> restore spfile from '/u03/fast_recovery_area/ORCL/backupset/2015_05_10/o1_mf_ncsnf_TAG20150510T183149_bnz20tdn_.bkp'; 

                  RMAN> restore controlfile from '/u03/fast_recovery_area/ORCL/backupset/2015_05_1/o1_mf_ncsnf_TAG20150510T183149_bnz20tdn_.bkp

                   

                  It seems control file should be backed up in the middle of the full backup,i mean after datafile backup complets and before archivelog backup begins.But above note says,it is backed up at the end of the successfull backup.

                  Regarding beginning middle or end of backup... Regardless, you have to recover the database using redo/archivelogs after you restore a backup that is inconsistent, meaning the database was open/running and not shutdown properly during the backup.

                   

                  Keep in mind that the database keeps creating archivelogs while the backup is running. These archivelogs will be required to recover the database. Hence the controflile at the end of the backup will contain the information of the archivelogs required - otherwise you will have to catalog archivelogs in the controlfile manually using the RMAN "catalog start with" command.

                  • 6. Re: rman duplicate
                    top.gun

                    The controlfile you restore will have all the archivelogs created at that time.

                    That's what you want.

                    You want the controlfile to have a record of all the archivelogs required to make the all datafiles consistent in the event of a restore and recovery.

                    • 7. Re: rman duplicate
                      3510875

                      Hi Support,

                       

                      Thanks for your answers.?

                       

                      Dude says "

                      RMAN always includes the spfile and controlfile when your backup includes the system tablespace",will this happen only when controlfile autobackup is on?

                      Will this control file has all the archivelogs information required to make the datafiles consistent when we use rman duplicate?

                       

                      Thank you

                      • 8. Re: rman duplicate
                        3510875

                        I understand even when control file autobackup is off,RMAN always includes the spfile and controlfile when your backup includes the system tablespace.Need your expertise on below concern

                         

                        Will this control file has all the archivelogs information required to make the datafiles consistent when we use rman duplicate?

                        • 9. Re: rman duplicate
                          Dude!

                          Always means always, regardless of whether controflie autobackup is on or off. Again, controlfile autoackup makes the process to restore the spfile and controlfile more user friendly and assures that you have a controlfile backup before there are structual database changes. For example, you cannot restore a tablespace that has been dropped and is no longer known in the current controlfile -- hence you need a prior controlfile, which you may not have available without controlfile autobackup depending on your current backup strategy.

                           

                          RMAN is more complex. Archivelogs are not only used according to the controlfile, but can also be added automatically when you use the Fast Recovery Area. So it all depends. Whether your controflile has all archivelogs required to fully recover the database after duplication depends on how you perfrom the database duplication, for example, using backupsets with or without target, or active duplication.

                           

                          Here are a few examples:

                          Oracle 12c Active Database Duplication Using Backup Sets Example

                          Oracle Database 11g: Disaster Recovery Example

                          DBPITR After Dropping a Tablespace

                          • 10. Re: rman duplicate
                            rugbyRCT

                            hello,

                             

                            By the listbackup that you may retrieve and read by my message above you retrieve the Scn which is correct for you.

                            then Rman duplicate will execute all the instructions necessary.

                            you have not to think about archive log or other. ( You need DBID too)

                            spool log to '/home/dupdatabase.log'

                            RMAN> run {

                            allocate auxiliary channel CH01 type 'SBT_TAPE'

                            parms='ENV=(NB_ORA_CLIENT=servername client,NB_ORA_SERV=Serversave)';

                            set until scn=5979386894263;   ### exemple ####

                            duplicate database BaseOrig DBID=4087574822 to BaseDUP;

                            release
                            channel CH01;

                            }

                             

                            cordially

                             

                            • 11. Re: rman duplicate
                              3510875

                              Thanks for all your replies.

                               

                              Hi dude,

                               

                              This note id 2054766.1 actually confused me which says control file should be backed up before archivelog backup and not at the end of the backup.

                               

                              I am managing 2 instances...one with 12.1.0.2 and other with 11.1,could you please clarify

                               

                              Thank you

                              • 12. Re: rman duplicate
                                Dude!

                                I cannot open doc id 2054766.1. It doesn't seems available. But I noticed you already wondered about it previously: RMAN

                                 

                                Anyway, fundamental RMAN backup and recovery concepts haven't changed.

                                 

                                When you type RMAN backup database plus archivelog, the following happens in the following order:

                                 

                                Controlfile Autobackup OFF:

                                 

                                1. Archiving current redolog.

                                2. Creating a backupset containing archivelog files.

                                3. Creating a backupset with the datafiles.

                                4. Creating a backupset including spfile and controlfile.

                                5. Archiving current redolog.

                                6. Creating a backupset containing archivelog files.

                                 

                                 

                                Controlfile Autobackup ON:

                                 

                                1. Archiving current redolog.

                                2. Creating a backupset containing archivelog files.

                                3. Creating a backupset with the datafiles.

                                4. Archiving current redolog.

                                5. Creating a backupset containing archivelog files.

                                6. Control File and SPFILE Autobackup

                                 

                                You will have to ask Oracle support, but to me, saying that a control file should be backed up before the archivelog backup doesn't make sense. I can't think of a reason or advantage. Generally speaking, in order to successfully master or troubleshoot backup and recovery, it is essential to understand how it works, not by learning RMAN rules, which all depends on the situation at hand.

                                • 13. Re: rman duplicate
                                  3510875

                                  Thanks for the update.The note id was opened till yesterday.Anyways this is the content of the note id

                                   

                                  RMAN-06054 While performing Duplicate (Doc ID 2054766.1)

                                   

                                  Duplicate process takes the SCN (for until scn) from most recent backup control file checkpoint_change# and if the SCN of the control file

                                  in the backup was higher than the SCN of the most recent archived log in backup, then RMAN recovery will be looking for archives to recover

                                  the database as per UNTIL SCN condition and it fails.

                                   

                                  Until 11.2.0.3, It was using Highest SCN of Archive log from the backup

                                  so it says,control file should not be backed up at the end of the backup,This made be confused

                                  • 14. Re: rman duplicate
                                    Dude!

                                    If I understand correctly, put simply, what the note outlines is that when the SCN in the controlfile is higher than the SCN of available archivelog backups, RMAN will be looking for archivelogs to recover and fail.

                                     

                                    Well, recovery will always fail when needed and necessary archivelogs are unavailable. That's nothing new!

                                     

                                    The way I see it:

                                     

                                    When you restore and recover a database in a disaster situation, you will usually want to recover the database to the most recent state possible. If you use a controlfile that was taken from before the backup of archivelogs, and you are not using FRA, you will have to catalog available archivelogs manually in order to accomplish the most recent recovery possible.

                                     

                                    The auxiliary or standby database during a RMAN duplicate does not necessarily have access to archivelogs of the target. As such, the scenario during RMAN duplicate is similar to restoring and recovering a database from scratch, but relying on RMAN backup only.  However since RMAN is an automated process, success of recovery is arguably more important than to recover the database to the most recent state possible. By using a controlfile and datafile backup that was taken before the archivelog backup, recovery will succeed as long that RMAN backup of archivelogs is available.

                                    1 2 Previous Next