1 2 3 Previous Next 30 Replies Latest reply: Jul 16, 2014 9:49 PM by MariaKarpa(MK) RSS

    Dataguard 102

    MariaKarpa(MK)

      Hi all,

       

      11.2.0.3.10

      aix6

       

      I just successfully created another dataguard physical standby, by following Oracle-Base docs.

       

      When it is time to test log transport, I run at PRIMARY:

       

      SELECT sequence#, first_time, next_time

      FROM   v$archived_log

      ORDER BY sequence#;

       

      SEQUENCE# FIRST_TIME           NEXT_TIME

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

           42309 04-JUL-2014 13:41:50 04-JUL-2014 17:57:48

           42310 04-JUL-2014 17:57:48 04-JUL-2014 21:34:19

           42311 04-JUL-2014 21:34:19 04-JUL-2014 22:02:28

           42312 04-JUL-2014 22:02:28 04-JUL-2014 22:06:17

           42313 04-JUL-2014 22:06:17 04-JUL-2014 22:08:31

           42314 04-JUL-2014 22:08:31 04-JUL-2014 23:34:10

           42315 04-JUL-2014 23:34:10 04-JUL-2014 23:37:24

           42316 04-JUL-2014 23:37:24 04-JUL-2014 23:37:48

           42317 04-JUL-2014 23:37:48 04-JUL-2014 23:37:49

           42318 04-JUL-2014 23:37:49 04-JUL-2014 23:46:46

           42319 04-JUL-2014 23:46:46 04-JUL-2014 23:54:40

           42320 04-JUL-2014 23:54:40 04-JUL-2014 23:54:41

           42321 04-JUL-2014 23:54:41 04-JUL-2014 23:58:37

           42322 04-JUL-2014 23:58:37 04-JUL-2014 23:58:37

       

       

      Then I run this query at STANDBY:

       

      SELECT sequence#, first_time, next_time, applied

      FROM   v$archived_log

      ORDER BY sequence#;

       

      SEQUENCE# FIRST_TIME           NEXT_TIME            APPLIED

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

             506 15-JUL-2014 07:32:23 15-JUL-2014 07:47:20 YES

             507 15-JUL-2014 07:47:20 15-JUL-2014 17:52:50 YES

             514 15-JUL-2014 22:11:11 15-JUL-2014 22:13:05 NO

             515 15-JUL-2014 22:13:05 15-JUL-2014 22:23:44 NO

             516 15-JUL-2014 22:23:44 15-JUL-2014 23:33:14 NO

       

       

      What is happening here why are the  sequences not synched?

       

      Please helpppp.

       

      Thanks,

      mk

        • 1. Re: Dataguard 102
          mseberg

          Hello;

           

          Can you run this from primary and post the results?

           

          http://www.visi.com/~mseberg/data_guard/monitor_data_guard_transport.html

           

          Best Regards

           

          mseberg

          • 2. Re: Dataguard 102
            MariaKarpa(MK)

            Thanks mseberg,

             

            The output is :

             

            DB_NAME    HOSTNAME       LOG_ARCHIVED LOG_APPLIED APPLIED_TIME    LOG_GAP

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

            BATCHPRO   ISTDBSTAGING          42322         516 16-JUL/00:00      41806

            • 3. Re: Dataguard 102
              mseberg

              OK;

               

              That's a huge gap! I'm thinking your standby setup is probably bad.

               

              Check the Standby alert log and it should show when the last log was applied.

               

              I would consider recreating using RMAN Duplicate from Active database.

               

              http://www.visi.com/~mseberg/data_guard/standby_creation_from_active_database_using_rman.html

               

              Best Regards

               

              mseberg

              • 4. Re: Dataguard 102
                MariaKarpa(MK)

                I can not use duplicate, because my remote DR site sa low bandwith and the db is quite big. I just need to compress the file rman backup and use FTP.

                 

                I can not understand why my backup last night has huge gap? You can see its date is July 15, 2014 and latest for the STANDBY.

                But the problem was the PRIMARY? it is dated JULY 04??? in its log sequence?

                 

                Thanks

                • 5. Re: Dataguard 102
                  mseberg

                  Hello again;

                   

                  The primary and standby alert logs are a great source of information on what your issue is.

                   

                  Given the huge sequence number difference I'm pretty sure the standby copy is bad.

                   

                  Could you use scp and send an RMAN copy over?

                   

                  http://www.visi.com/~mseberg/data_guard/duprman2.html

                   

                  Best Regards

                   

                  mseberg

                  • 6. Re: Dataguard 102
                    MariaKarpa(MK)

                    Hi,

                     

                    This the contents of alert log at standby.

                     

                    Archived Log entry 11 added for thread 1 sequence 508 rlc 852077656 ID 0xc77b406c dest 2:

                    Wed Jul 16 00:00:39 2014

                    Media Recovery Log /oracle/app/oracle/product/11.2.0.3/dbhome_1/dbs/arch1_508_852077656.dbf

                    Media Recovery Log /oracle/app/oracle/product/11.2.0.3/dbhome_1/dbs/arch1_509_852077656.dbf

                    Wed Jul 16 00:00:51 2014

                    Media Recovery Log /oracle/app/oracle/product/11.2.0.3/dbhome_1/dbs/arch1_510_852077656.dbf

                    Media Recovery Log /oracle/app/oracle/product/11.2.0.3/dbhome_1/dbs/arch1_511_852077656.dbf

                    Wed Jul 16 00:01:18 2014

                    Media Recovery Log /oracle/app/oracle/product/11.2.0.3/dbhome_1/dbs/arch1_512_852077656.dbf

                    Media Recovery Log /oracle/app/oracle/product/11.2.0.3/dbhome_1/dbs/arch1_513_852077656.dbf

                    Wed Jul 16 00:01:31 2014

                    Media Recovery Log /oracle/app/oracle/product/11.2.0.3/dbhome_1/dbs/arch1_514_852077656.dbf

                    Media Recovery Log /oracle/app/oracle/product/11.2.0.3/dbhome_1/dbs/arch1_515_852077656.dbf

                    Wed Jul 16 00:01:42 2014

                    Media Recovery Log /oracle/app/oracle/product/11.2.0.3/dbhome_1/dbs/arch1_516_852077656.dbf

                    Media Recovery Waiting for thread 1 sequence 517 (in transit)

                    Wed Jul 16 00:42:42 2014

                    Archived Log entry 12 added for thread 1 sequence 517 rlc 852077656 ID 0xc77b406c dest 2:

                    RFS[3]: No standby redo logfiles created for thread 1

                    RFS[3]: Opened log for thread 1 sequence 518 dbid -1015798052 branch 852077656

                    Wed Jul 16 00:42:42 2014

                    Media Recovery Log /oracle/app/oracle/product/11.2.0.3/dbhome_1/dbs/arch1_517_852077656.dbf

                    Media Recovery Waiting for thread 1 sequence 518 (in transit)

                    Wed Jul 16 00:43:56 2014

                    Archived Log entry 13 added for thread 1 sequence 518 rlc 852077656 ID 0xc77b406c dest 2:

                    RFS[3]: No standby redo logfiles created for thread 1

                    RFS[3]: Opened log for thread 1 sequence 519 dbid -1015798052 branch 852077656

                    Wed Jul 16 00:43:58 2014

                    Media Recovery Log /oracle/app/oracle/product/11.2.0.3/dbhome_1/dbs/arch1_518_852077656.dbf

                    Media Recovery Waiting for thread 1 sequence 519 (in transit)

                    Wed Jul 16 00:45:31 2014

                    Archived Log entry 14 added for thread 1 sequence 519 rlc 852077656 ID 0xc77b406c dest 2:

                    RFS[3]: No standby redo logfiles created for thread 1

                    RFS[3]: Opened log for thread 1 sequence 520 dbid -1015798052 branch 852077656

                    Wed Jul 16 00:45:35 2014

                    Media Recovery Log /oracle/app/oracle/product/11.2.0.3/dbhome_1/dbs/arch1_519_852077656.dbf

                    Media Recovery Waiting for thread 1 sequence 520 (in transit)

                    • 7. Re: Dataguard 102
                      mseberg

                      So the query I had you run show the last log number as 42322


                      But the Standby is waiting for 520. It's unlikely you still have the logs on the Primary given the gap of 41806.


                      Is it possible this standby is for a different database?


                      Best Regards


                      mseberg

                      • 8. Re: Dataguard 102
                        MariaKarpa(MK)

                        Well, this is weird. I was encoutering error like wrong incarnation. So I am choosing  set of different encarnations like 3, 2, 1 and choose which is available. I can not understand why this encarnation always happens here?

                        • 9. Re: Dataguard 102
                          mseberg

                          That would explain at least part of it.

                           

                          What is your plan of action?

                           

                          Best Regards

                           

                          mseberg

                          • 10. Re: Dataguard 102
                            MariaKarpa(MK)

                            I am running a new > backup as compressed backupset database plus archivelog;

                             

                            But my worries is, what if It will ask wrong encarnation again? Does this mean our backup location is corrupted? How do I clean up old files so it will not get the old incarnation.

                            I always do delete obsolete after and RMAN backup. So why does it still see the old ones? How do I check or crosscheck if my current backup is really new? and not old incarnation?

                             

                             

                            Thanks

                            • 11. Re: Dataguard 102
                              mseberg

                              Run the backup as a one off job as I show here:

                               

                              http://www.visi.com/~mseberg/data_guard/duprman2.html

                               

                              This avoids conflicts with your regular recovery backup and you should have no issue with it being current.

                               

                              Best Regards

                               

                              mseberg

                              • 12. Re: Dataguard 102
                                MariaKarpa(MK)

                                Hi all,

                                 

                                This is really a disaster.

                                 

                                I have repeated the process of dataguard , and I am very sure I got the latest backup to restore.

                                And I have no incarnation error. But why is my output same as the first?

                                 

                                I have just recover the backup then check the log transport.

                                 

                                So at primary:

                                 

                                1  SELECT sequence#, first_time, next_time

                                  2  FROM   v$archived_log

                                  3* ORDER BY sequence#

                                 

                                SEQUENCE# FIRST_TIME           NEXT_TIME

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

                                     42309 04-JUL-2014 13:41:50 04-JUL-2014 17:57:48

                                     42310 04-JUL-2014 17:57:48 04-JUL-2014 21:34:19

                                     42311 04-JUL-2014 21:34:19 04-JUL-2014 22:02:28

                                     42312 04-JUL-2014 22:02:28 04-JUL-2014 22:06:17

                                     42313 04-JUL-2014 22:06:17 04-JUL-2014 22:08:31

                                     42314 04-JUL-2014 22:08:31 04-JUL-2014 23:34:10

                                     42315 04-JUL-2014 23:34:10 04-JUL-2014 23:37:24

                                     42316 04-JUL-2014 23:37:24 04-JUL-2014 23:37:48

                                     42317 04-JUL-2014 23:37:48 04-JUL-2014 23:37:49

                                     42318 04-JUL-2014 23:37:49 04-JUL-2014 23:46:46

                                     42319 04-JUL-2014 23:46:46 04-JUL-2014 23:54:40

                                     42320 04-JUL-2014 23:54:40 04-JUL-2014 23:54:41

                                     42321 04-JUL-2014 23:54:41 04-JUL-2014 23:58:37

                                     42322 04-JUL-2014 23:58:37 04-JUL-2014 23:58:37

                                 

                                Why is my primary july 4? my standby is correct at July 16???

                                Why is my primary wrong?

                                 

                                 

                                At standby :

                                 

                                SELECT sequence#, first_time, next_time, applied

                                FROM   v$archived_log

                                ORDER BY sequence#;

                                Session altered.

                                 

                                 

                                SQL> SQL>   2    3

                                 

                                 

                                SEQUENCE# FIRST_TIME           NEXT_TIME            APPLIED

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

                                       539 16-JUL-2014 02:30:32 16-JUL-2014 02:48:00 YES

                                       540 16-JUL-2014 02:48:00 16-JUL-2014 03:36:50 YES

                                • 13. Re: Dataguard 102
                                  MariaKarpa(MK)

                                  Hi all,

                                   

                                  Can you help please....

                                  I remember I restore this primary last July 4  from rmanbackup and it is opened resetlogs. But why is it not changing the date?

                                   

                                   

                                  Thanks,

                                  • 14. Re: Dataguard 102
                                    mseberg

                                    Can you run these on your Primary ?

                                     

                                    column NAME format A9

                                    column LOG_MODE format A12

                                     

                                    SELECT NAME,CREATED, LOG_MODE, DBID FROM V$DATABASE;

                                     

                                     

                                    select max(sequence#) from v$archived_log where NEXT_TIME > sysdate -1;

                                    1 2 3 Previous Next