8 Replies Latest reply: Jun 5, 2014 6:44 AM by petra-K RSS

    Rebuilding dataguard

      Hi all,

       

      11.2.0.3

      aix6

       

       

      I am rebuilding my dataguard  for our db because I recovered primary from a backup  week ago.

      I drop first my physical standby using DBCA and remove physical datafles.

      Then I did the physical standby creation.

      Next, I switch log files to test if it was applied to the standby.

       

      To my surprise!!! this is the output at primary:

       

      select sequence#, first_time, applied from v$archived_log order by sequence#;

      SEQUENCE# FIRST_TIM APPLIED

      ---------- --------- ---------

             523 05-JUN-14 NO

             523 05-JUN-14 NO

             524 05-JUN-14 NO

             524 05-JUN-14 NO

             525 05-JUN-14 NO

             525 05-JUN-14 NO

             526 05-JUN-14 NO

             526 05-JUN-14 NO

             527 05-JUN-14 NO

             527 05-JUN-14 NO

       

      And this is the output of my standby:

       

      SQL> select sequence#, first_time, applied from v$archived_log order by sequence#;

       

      SEQUENCE# FIRST_TIM APPLIED

      ---------- --------- ---------

             521 05-JUN-14 NO

             522 05-JUN-14 NO

             523 05-JUN-14 NO

             524 05-JUN-14 NO

             525 05-JUN-14 NO

             526 05-JUN-14 NO

             527 05-JUN-14 NO

       

      7 rows selected.

       

       

      Why is the logs not applied? as "NO"?

       

       

      Please helpppp...

       

      Thanks,

      pK

        • 1. Re: Rebuilding dataguard
          FreddieEssex

          Is the database in managed recovery mode?

           

          There will be some error in your alert logs which will point you out to why recovery isn't taking place.

           

          Seek and ye shall find.

          • 2. Re: Rebuilding dataguard

            Thanks, freddieboy ....brb I will check.

             

            Which alert? the primary or standby?

            • 3. Re: Rebuilding dataguard
              FreddieEssex

              Thanks, freddieboy ....brb I will check.

               

              No problem petra-sloth......I eagerly await in anticipation.

               

              Which alert? the primary or standby?

               

              Why not both?

              • 4. Re: Rebuilding dataguard

                Hi fred,

                 

                I got this in my standby alert log:

                 

                Errors in file /u20/app/oracle/diag/rdbms/bncuatdr/UATDR/trace/UATDR_ora_7536664.trc:

                ORA-00313: open failed for members of log group 7 of thread 0

                Completed: alter database clear logfile group 7

                • 5. Re: Rebuilding dataguard
                  FreddieEssex

                  Any errors in your primary alert log?

                   

                  What errors do you get when you switch a logfile on the primary?

                  • 6. Re: Rebuilding dataguard

                    Well the error at primary seem not related ?

                     

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

                    Thu Jun 05 18:35:46 2014

                    LNS: Attempting destination LOG_ARCHIVE_DEST_2 network reconnect (12152)

                    LNS: Destination LOG_ARCHIVE_DEST_2 network reconnect abandoned

                    Error 12152 for archive log file 1 to 'UATDR'

                    Errors in file /u20/app/oracle/diag/rdbms/uat/UAT/trace/UAT_nsa2_6947006.trc:

                    ORA-12152: TNS:unable to send break message

                    LNS: Failed to archive log 1 thread 1 sequence 532 (12152)

                    Thu Jun 05 18:36:12 2014

                    PING[ARC2]: Heartbeat failed to connect to standby 'UATDR'. Error is 16058.

                    Thu Jun 05 18:36:18 2014

                    ALTER SYSTEM SET log_archive_dest_state_2='ENABLE' SCOPE=MEMORY SID='*';

                    Thu Jun 05 18:37:14 2014

                    Thread 1 advanced to log sequence 533 (LGWR switch)

                      Current log# 2 seq# 533 mem# 0: /u21/ORACLE/ORADATA/UAT/redo02.log

                    Thu Jun 05 18:37:14 2014

                    Archived Log entry 154 added for thread 1 sequence 532 ID 0xffffffff94f12a10 dest 1:

                    Thu Jun 05 18:37:14 2014

                    • 7. Re: Rebuilding dataguard
                      FreddieEssex

                      LNS: Failed to archive log 1 thread 1 sequence 532 (12152)

                      Thu Jun 05 18:36:12 2014

                      PING[ARC2]: Heartbeat failed to connect to standby 'UATDR'. Error is 16058.

                      I think it's very much related.

                       

                      Check your tnsnames, listener etc and make sure you can connect from the primary to standby and vice versa.

                      • 8. Re: Rebuilding dataguard

                        Thanks....

                        Ok I founf it! , there at my standby it says , "wallet is not open". So I copied my wallet folder from primary to standby and the open it,

                        Then stop/start standby, and it is is now applying logs.

                         

                        Thanksssssssssssssss so much.