1 2 Previous Next 24 Replies Latest reply: Jul 10, 2014 2:30 AM by Ivica Arsov RSS

    Why create redo logs in standby?

    MariaKarpa(MK)

      Hi all,

       

      11.2.0.3.10

      aix 6

       

      I tried to follow this doc which installing/configuring dataguard > http://www.oracle-base.com/articles/11g/data-guard-setup-11gr2.php

       

      I am just confused about the following steps:

       

      Restore the backup files.

      ==================

       

      $ export ORACLE_SID=DB11G

      $ rman target=/

       

      RMAN> STARTUP MOUNT;

      RMAN> RESTORE DATABASE;

       

      Create Redo Logs

      =============

      Create online redo logs for the standby. It's a good idea to match the configuration of the primary server.

       

      ALTER SYSTEM SET STANDBY_FILE_MANAGEMENT=MANUAL;

      ALTER DATABASE ADD LOGFILE ('/u01/app/oracle/oradata/DB11G/online_redo01.log') SIZE 50M;

      ALTER DATABASE ADD LOGFILE ('/u01/app/oracle/oradata/DB11G/online_redo02.log') SIZE 50M;

      ALTER DATABASE ADD LOGFILE ('/u01/app/oracle/oradata/DB11G/online_redo03.log') SIZE 50M;

      ALTER SYSTEM SET STANDBY_FILE_MANAGEMENT=AUTO;

       

       

      My question is, why do I need to create online redo logs for standby, when they are already created when you restore the backup?

      Are the online redo logs does not match with the backup? or not being backed-up?

       

      Thanks,

      mk

        • 1. Re: Why create redo logs in standby?
          Ivica Arsov

          Hi,

           

          I don't fully understand your question.

          Online redo logs on standby are required if you perform switchover/failover on your standby to become primary.

           

          Ivica

          • 2. Re: Why create redo logs in standby?
            MariaKarpa(MK)

            Yes, but the online redo logs are part of the backup. So when I restore the backup the online redo logs are restored too? right? or are they not included in backed-up?

             

            Why is that if I select v$logfile in the standby db, I can see the online redo logs?

             

            So why create them again?

            • 3. Re: Why create redo logs in standby?
              Ivica Arsov

              How do you perform the backup ?

              RMAN doesn't backup online redo logs.

               

              They are registered in your standby control file because you've copied/created the control file from the primary site (database).

               

              Ivica

              • 4. Re: Why create redo logs in standby?
                BPeaslandDBA

                 

                Yes, but the online redo logs are part of the backup. So when I restore the backup the online redo logs are restored too? right? or are they not included in backed-up?

                 

                Why is that if I select v$logfile in the standby db, I can see the online redo logs?

                 

                So why create them again?

                 

                If you use RMAN to create your physical standby, the online redo logs are not included. RMAN doesn't backup online redo logs. So you have to manually add them.

                 

                The reason you can see them in V$LOGFILE is that they are noted in the control file and Data Dictionary, but the actual files do not exist.

                 

                While you're busy creating online redo log files, then also consider creating Standby Redo Logs too.

                 

                HTH,

                Brian

                • 5. Re: Why create redo logs in standby?
                  MariaKarpa(MK)

                  I am now confused.

                   

                  I have just restored an rman backup from our PROD site to our  DR site because we need to do some maintenance at the MainOffice, I applied latest archived logs then started it with open resetlogs. Then we switched our production to it (DR sites). I did not add any redo logs, but it is working up to now.   So what redo logs is it using? Did It create a default one? So what will happened to our PROD database? Will it fail later or sooner?

                   

                  Thanks all,

                  • 6. Re: Why create redo logs in standby?
                    Hemant K Chitale

                    The "OPEN RESETLOGS"  created the online redo logs.

                    Apparently you are NOT using DataGuard if you restored an rman backkup and OPENed the database.  Your DR site is not an "Oracle Standby Database".   You did not use the dataguard procedures to FAILOVER TO STANDBY.

                    Your DR site database has now diverged from the Production database.

                     

                     

                    Hemant K Chitale

                    • 7. Re: Why create redo logs in standby?
                      MariaKarpa(MK)

                      Thanks hemant

                       

                      But the previous discussions mentioned using RMAN only will not create redo logs?

                       

                      How about DATAGUARD using rman duplicate database? will it create redo logs of not?

                       

                       

                      Thanks.

                      • 8. Re: Why create redo logs in standby?
                        Hemant K Chitale

                        No, rman does not creat the redo logs.  Duplicate does not create the redo logs.

                        OPEN RESETLOGS creates the redo logs -- and this is executed by DUPLICATE DATABASE .

                         

                         

                        Hemant K Chitale


                        • 9. Re: Why create redo logs in standby?
                          MariaKarpa(MK)

                          But I have other tasks of creating dataguard physical standby using rman duplicate.

                          I created DG standby db using duplicate database. So it is not yet opened resetlogs.

                          • 10. Re: Why create redo logs in standby?
                            Hemant K Chitale

                            You can query V$LOG and V$LOGFILE.

                             

                            But the files don't exist until you OPEN the database.

                             

                            See Brian's response "The reason you can see them in V$LOGFILE is that they are noted in the control file and Data Dictionary, but the actual files do not exist. "

                             

                            Hemant K Chitale

                             


                            • 11. Re: Why create redo logs in standby?
                              MariaKarpa(MK)

                              Thanks hemant sir,

                               

                              select * from v$logfile;

                               

                              PRIMARY

                               

                              3 ONLINE /u01/ORACLE/ORADATA/PROD1/redo03.log NO

                              2 ONLINE /u01/ORACLE/ORADATA/PROD1/redo02.log NO

                              1 ONLINE /u01/ORACLE/ORADATA/PROD1/redo01.log NO

                              4 STANDBY /u01/fast_recovery_area/PROD1/onlinelog/o1_mf_4_9shtp7nv_.log YES

                              5 STANDBY /u01/fast_recovery_area/PROD1/onlinelog/o1_mf_5_9shtphpv_.log YES

                              6 STANDBY /u01/fast_recovery_area/PROD1/onlinelog/o1_mf_6_9shtplty_.log YES

                              7 STANDBY /u01/fast_recovery_area/PROD1/onlinelog/o1_mf_7_9shtpn8d_.log YES

                               

                              STANDBY

                               

                              3 ONLINE /u01/fast_recovery_area/PROD1DR/onlinelog/o1_mf_3_9sj7b2tl_.log YES

                              2 ONLINE /u01/fast_recovery_area/PROD1DR/onlinelog/o1_mf_2_9sj7b263_.log YES

                              1 ONLINE /u01/fast_recovery_area/PROD1DR/onlinelog/o1_mf_1_9sj7b1tz_.log YES

                              4 STANDBY /u01/fast_recovery_area/PROD1DR/onlinelog/o1_mf_4_9sj7b34j_.log YES

                              5 STANDBY /u01/fast_recovery_area/PROD1DR/onlinelog/o1_mf_5_9sj7b3gd_.log YES

                              6 STANDBY /u01/fast_recovery_area/PROD1DR/onlinelog/o1_mf_6_9sj7b3rm_.log YES

                              7 STANDBY /u01/fast_recovery_area/PROD1DR/onlinelog/o1_mf_7_9sj7b442_.log YES

                               

                              Why are the redo logs in standby all 'YES'?

                              • 12. Re: Why create redo logs in standby?
                                MariaKarpa(MK)

                                I also checked the physical files and they are existing.

                                 

                                oracle@boldbdr:/u01/fast_recovery_area/PROD1DR/onlinelog>ls -lrt

                                total 716856

                                -rw-------    1 oracle   dba        52429312 Jun 11 17:11 o1_mf_2_9sj7b263_.log

                                -rw-------    1 oracle   dba        52429312 Jun 11 17:11 o1_mf_1_9sj7b1tz_.log

                                -rw-------    1 oracle   dba        52429312 Jun 11 17:11 o1_mf_3_9sj7b2tl_.log

                                -rw-------    1 oracle   dba        52429312 Jun 11 17:11 o1_mf_7_9sj7b442_.log

                                -rw-------    1 oracle   dba        52429312 Jul 07 22:27 o1_mf_6_9sj7b3rm_.log

                                -rw-------    1 oracle   dba        52429312 Jul 10 12:20 o1_mf_5_9sj7b3gd_.log

                                -rw-------    1 oracle   dba        52429312 Jul 10 12:26 o1_mf_4_9sj7b34j_.log

                                • 13. Re: Why create redo logs in standby?
                                  Hemant K Chitale

                                  Those are Standby Logs not Online Redo Logs.

                                   

                                  Hemant K Chitale

                                  • 14. Re: Why create redo logs in standby?
                                    MariaKarpa(MK)

                                    Thanks ,hemant sir

                                     

                                    What is the advantage if IS_RECOVERY_DEST_FILE = 'YES' ?  against 'NO'?

                                    How do I changed the NO to YES?

                                    1 2 Previous Next