oracle11g Dataguard Failover post-rebuild archive log is not applied by no problem

Source: Internet
Author: User
Tags failover

1, the main library is not consistent from the library archive record, as follows:

After failover, the bad Old Main library becomes new from the library, but the new archive log records from the library are inconsistent, that is, the archive log list, out of and v$archived_log out of the number, as follows:

1.1 Main Library:
loglog mode          Archive ModeAutomatic archival         EnabledArchive destination        log sequence     8Nextlogto archive   10log sequence           10
sql> select Sequence# , applied from V$archived_log order by sequence# ASC;  ...-------------------7527  yes  7527  yes  7528  yes  7528  yes  
    
     7529  
     yes  
     7530       Span class= "hljs-literal" >yes  
     7531  
     yes       
     7532  
     yes  
     7533  
     yes  
     14529  rows selected. 
     

You can see that the archive log list and the V$archived_log record archive are inconsistent in the main library.

1.2 From the library:
loglog mode          Archive ModeAutomatic archival         EnabledArchive destination        log sequence     10Nextlogto archive   0log sequence           10
selectsequencefromorderbysequenceascSEQUENCE# APPLIED---------- ---------     9IN-MEMORYSQL>

The archive from the library has not been applied, and the two also looked for a number difference, one for 10 and one for 9.

PS: You see the main library and the archive number from the library is not unified, inconsistent.

2. Clear the archive record for the new main library

The problem is whether the archived log records for the old master library are retained on the new primary library, and need to be cleaned up manually to perform cleanup records on the new primary library:

SQL> execute sys.dbms_backup_restore.resetCfileSection(11procedure successfully completed.SQL> SQL> SQL>  select sequence#,applied from v$archived_log order by sequence# asc;

Go to archive log directory and manually delete old archived logs

[oracle@oracle_standby1 archivelog]$ 2015_12_132015_12_192015_12_202015_12_212015_12_222015_12_232015_12_242015_12_25[oracle@oracle_standby1 archivelog]$ 

Then go to Rman to execute

rman> catalog Db_recovery_file_dest; rman> Catalog db_recovery_file_dest;using Target Database controlfileinstead ofRecovery catalogsearching for  AllFilesinchThe recovery arealist ofFiles Unknown toThe database=====================================FileName:/oracle/app/oracle/flash_recovery_area/standby/onlinelog/o1_mf_9_c7c1v5qw_.logFileName:/oracle/app/oracle/flash_recovery_area/standby/onlinelog/o1_mf_7_c7c1ttf1_.logFileName:/oracle/app/oracle/flash_recovery_area/standby/onlinelog/o1_mf_8_c7dst287_.logFileName:/oracle/app/oracle/flash_recovery_area/standby/onlinelog/o1_mf_7_c7dssvfd_.logFileName:/oracle/app/oracle/flash_recovery_area/standby/onlinelog/o1_mf_9_c7dst8wr_.logFileName:/oracle/app/oracle/flash_recovery_area/standby/onlinelog/o1_mf_8_c7c1v0ff_.logFileName:/oracle/app/oracle/flash_recovery_area/standby/archivelog/ -_12_26/O1_MF_1_9_C7WQVRP9_.ARCDO you really want toCatalog The above files (enter YESorNO)? Yescataloging files...cataloging Donelist ofCataloged files=======================FileName:/oracle/app/oracle/flash_recovery_area/standby/archivelog/ -_12_26/o1_mf_1_9_c7wqvrp9_.arclist ofFiles which Where notcataloged=======================================FileName:/oracle/app/oracle/flash_recovery_area/standby/onlinelog/o1_mf_9_c7c1v5qw_.log RMAN-07529: Reason:catalog is  notSupported forThisfile typeFileName:/oracle/app/oracle/flash_recovery_area/standby/onlinelog/o1_mf_7_c7c1ttf1_.log RMAN-07529: Reason:catalog is  notSupported forThisfile typeFileName:/oracle/app/oracle/flash_recovery_area/standby/onlinelog/o1_mf_8_c7dst287_.log RMAN-07529: Reason:catalog is  notSupported forThisfile typeFileName:/oracle/app/oracle/flash_recovery_area/standby/onlinelog/o1_mf_7_c7dssvfd_.log RMAN-07529: Reason:catalog is  notSupported forThisfile typeFileName:/oracle/app/oracle/flash_recovery_area/standby/onlinelog/o1_mf_9_c7dst8wr_.log RMAN-07529: Reason:catalog is  notSupported forThisfile typeFileName:/oracle/app/oracle/flash_recovery_area/standby/onlinelog/o1_mf_8_c7c1v0ff_.log RMAN-07529: Reason:catalog is  notSupported forThisfile typeRman>Exit

Then go to the SQL command to view:

SQL>  selectsequencefromorderbysequenceascSEQUENCE# APPLIED---------- ---------     9
3, after switch switch log test

Main Library:

SQL> alter system switch logfile;System altered.SQL>  selectsequencefromorderbysequenceascSEQUENCE# APPLIED---------- ---------     9 NO    10 NO    10

From library:

selectsequencefromorderbysequenceascSEQUENCE# APPLIED---------- ---------     9 YES    10

See both sides of the archive log and the application is consistent.

oracle11g Dataguard Failover post-rebuild archive log is not applied by no problem

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.