13 Replies Latest reply on Sep 29, 2018 4:56 AM by Jhil

    Confusions on REDO APPLY ON DR ENV ..

    Jhil

      Dear DR Experts ,

       

      I have a small confusion..

      AS we know redo data is transferred by LNS from Primary to Standby.

       

       

      Whenever we do any changes (DDL OR DML)  on primary, immediately updates are reflected on Standby because we enabled REAL TIME APPLY.

      i.e no need to wait for archived files ... redo stream is directly transferred from primary to Standby

       

      >> My Questions are

       

      1) Redo data is transferred and applied on Standby before log switch on primary, why Oracle sends archived logs from Primary to Standby again afer log switch ?

      2) Are we applying same statements twice ?

       

      First time  -->  Via redo stream (through real time apply)

      Second time --> Via Archived logs (which is shipped from Primary to Standby each log switch )

       

      Please clarify

        • 1. Re: Confusions on REDO APPLY ON DR ENV ..
          Ian Baugaard

          Hi,

           

          The documentation on real-time apply has a nice diagram which illustrates how things function.

           

          1) Redo data is transferred and applied on Standby before log switch on primary, why Oracle sends archived logs from Primary to Standby again afer log switch ?

           

          In a real-time apply scenario, archived logs from primary is NOT sent to standby. Instead, the ARCH processes on the standby creates archived logs from the local standby redo logs

           

          2) Are we applying same statements twice ?

           

          First time --> Via redo stream (through real time apply)

          Second time --> Via Archived logs (which is shipped from Primary to Standby each log switch )

           

          Absolutely NOT. The physical standby is a block-for-block copy of the primary database and the MRP process does not apply redo from both the SRL and the archived logs. It simply cannot, because applying either of those streams will move the SCN of the standby database forward and you cannot apply redo from an earlier SCN over a higher one.

           

          Hope this helps

           

          Ian

          1 person found this helpful
          • 2. Re: Confusions on REDO APPLY ON DR ENV ..
            Jhil

            Hi IAN

             

            Question second was very clear .. Ton Thanks !

             

            Anyhow redo data is moving to Standby 2 ways - am i right ?

             

            1)  LNS transfers redo from ORL (on primary)  to SRL  (on standby)

            2) After log switch on Primary DB , archived logs are send to Standby from Primary..

             

            Why 2 ways are required here ?  - This is my actual question

            • 3. Re: Confusions on REDO APPLY ON DR ENV ..
              CristianR-Oracle

              Wrong.

               

              1)  LNS transfers redo from ORL (on primary)  to SRL  (on standby)

              YES

               

              2) After log switch on Primary DB , archived logs are send to Standby from Primary..

              NO - archive are generated from the local standby redo

              1 person found this helpful
              • 4. Re: Confusions on REDO APPLY ON DR ENV ..
                Ian Baugaard

                Hi,

                 

                There aren't two ways that redo is sent, only one. In a configuration with a primary and single standby database, the log_archive_dest_2 parameter (Typically, but could be any of the others) is set on the primary. This specifies the target standby database to send redo to, whether or not it's via real-time apply or archived logs.

                 

                Check the section on Redo Transport Services for more information

                 

                Hope this helps

                 

                Ian

                1 person found this helpful
                • 5. Re: Confusions on REDO APPLY ON DR ENV ..
                  Jhil

                  Ok ... i got your points ..

                  I am going through docs ..will be back after some time !

                   

                  Thanks IAN &  CristianR-Oracle

                   

                   

                  • 6. Re: Confusions on REDO APPLY ON DR ENV ..
                    CristianR-Oracle

                    If your are satisfied with any of the above responses please mark the thread as Answered by marking the appropriate response as the correct one,

                     

                    Regards,

                    Cristian

                    • 7. Re: Confusions on REDO APPLY ON DR ENV ..
                      Jhil

                      Definitely Cristian

                       

                      I never missed to mark as  "ANSWERED"  .. if i get 100% satisfied

                      Give me some time .. still i did not complete the links ..

                       

                       

                       

                       

                      • 8. Re: Confusions on REDO APPLY ON DR ENV ..
                        Jhil

                        This was very clear ..

                        The documentation on real-time apply has a nice diagram which illustrates how things function.

                         

                        Tell me one thing ..

                         

                        Actually LNS picks redo data from ORL Files or  RLBC  of Primary ?

                         

                        I saw another one doc .. pls review attached screenshot :-

                         

                        Untitled.png

                         

                        Have you noticed ?

                         

                        From above screenshot , LNS picks redo from ORL

                        From your like ( LNS is not picking redo from ORL Files ..

                         

                        Please clarify.

                        Thanks

                         

                         

                        • 9. Re: Confusions on REDO APPLY ON DR ENV ..
                          Ian Baugaard

                          Hi,

                           

                          It isn't 100% clear, but the last mention of LNS is in the 10.2 documentation. From 11.2 onward there is no further inclusion thereof.

                           

                          We don't have any 10.2 environments around to check, only 11.2 and above. On those systems, I don't see specific mention of a LNS background process.

                           

                          SQL> select * from v$bgprocess where upper(name) like 'LNS%'

                           

                          That said, here is a difference in the alert.log file from an 11.2 primary database

                           

                          LNS: Standby redo logfile selected for thread 1 sequence 29353 for destination LOG_ARCHIVE_DEST_2

                           

                          And an extract from a 12.1 primary database

                           

                          TT00: Standby redo logfile selected for thread 1 sequence 42342 for destination LOG_ARCHIVE_DEST_2

                           

                          It doesn't answer the question, but how important is it to you to know which process is handling the necessary work?

                           

                          Ian

                          • 10. Re: Confusions on REDO APPLY ON DR ENV ..
                            Jhil

                            Hi IAN,

                             

                            I am NOT asking who is sending redo stream from Primary to Standby ?

                             

                            From where redo data is picked ?   - Are you catching my question ?

                            From memory or ORL  Files

                            I am getting bit confused ...

                             

                            Thanks

                            • 11. Re: Confusions on REDO APPLY ON DR ENV ..
                              JuanM

                              Hello.

                              In DG you can use either Not real time apply using archived redo logs or real time apply using Standby redo logs.

                              Using Stanby redo logs using real time apply you can either use sync or async replication.

                              So in your picture, you are seeing Async replication.

                              Check the images posted by Brian Peasland's entry blog

                              Standby Redo Logs – Why and How?

                              There are pictures that would help you to understand sync or async replication.

                              Sync replication the LGWR gives redo entries directly to NSS process with Async replication redo entries are taken from ORL.

                               

                              Regards,

                              JuanM

                              1 person found this helpful
                              • 12. Re: Confusions on REDO APPLY ON DR ENV ..
                                Jhil

                                There are pictures that would help you to understand sync or async replication.

                                Sync replication the LGWR gives redo entries directly to NSS process with Async replication redo entries are taken from ORL.


                                 

                                Thanks JuanM !

                                Thanks IAN & CHRISTIAN !

                                • 13. Re: Confusions on REDO APPLY ON DR ENV ..
                                  Jhil

                                  Hi All,

                                   

                                  I gone through following video ... please watch this short 15 mins video once !

                                   

                                  https://www.youtube.com/watch?v=jVBuiy-Xqls&t=5s