DataGuard failover Oracle11g reconstruction after the archive log has not been applied to the problem of NO

Label 11g Oracle
830 people read comment(0) Collection Report
Classification:

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

After failover, bad old main library into a new library, but the new library from the archive log record is not consistent, that is, log list archive; out and v$archived_log out on the number, as shown below:

1.1 main library:
Archive SQL>LogList;
DatabaseLogArchive Mode mode
Archival Enabled Automatic
Destination USE_DB_RECOVERY_FILE_DEST Archive
Online OldestLogSequenceEight
Next LogSequenceToArchiveTen
CurrentLogSequenceTen
SQL>
Select sequence SQL>#, applied from v$archived_log order by sequence# asc;
......
-------------------
      Seven thousand five hundred and twenty-seven YES
      Seven thousand five hundred and twenty-seven YES
      Seven thousand five hundred and twenty-eight YES
      Seven thousand five hundred and twenty-eight YES
      Seven thousand five hundred and twenty-nine YES
      Seven thousand five hundred and thirty YES
      Seven thousand five hundred and thirty-one YES
      Seven thousand five hundred and thirty-two YES
      Seven thousand five hundred and thirty-three YES

Fourteen thousand five hundred and twenty-nineSelected. rows

You can see the main library log list archive and v$archived_log records archive is not consistent.

1.2 from the library:

Archive SQL>LogList;
DatabaseLogArchive Mode mode
Archival Enabled Automatic
Destination USE_DB_RECOVERY_FILE_DEST Archive
Online OldestLogSequenceTen
Next LogSequenceToArchiveZero
CurrentLogSequenceTen
SQL>
SQL>Select Sequence#, appliedFromV$archived_logOrder By Sequence#ASC;

 SEQUENCE# APPLIED
-------------------
     Nine IN-MEMORY

SQL>

Archive from the library has not been applied, but the two also checked a number of poor, one for the 10, one for the 9.

PS: we see the main library and archive number from the library is not unified, not consistent.


2, clear the archive records of the new main library

The problem is that the archive log records of the old main library are kept on the new main library, and you need to clean it by hand:

Execute sys.dbms_backup_restore.resetCfileSection SQL> (Eleven);

PL/SQLProcedure Successfully Completed.

SQL>
SQL>
SQL>Select Sequence#,Applied From V$Archived_log Order By Sequence#ASC;

Rows selected no

SQL>

To archive the log directory, delete the old archive log

[oracle@oracle_standby1Archivelog]$RM -rf2015_12_13/2015_12_19 2015_12_20 2015_12_21 2015_12_22 2015_12_23 2015_12_24 2015_12_25
[oracle@oracle_standby1Archivelog]$

And then enter the RMAN execution

Catalog db_recovery_file_dest RMAN>;
Catalog db_recovery_file_dest RMAN>;

Target database control usingFileInsteadOfCatalog recovery
SearchingFor AllFilesInRecovery area the

ListOfUnknown FilesToDatabase the
=====================================
File/oracle/app/oracle/flash_recovery_area/STANDBY/onlinelog/o1_mf_9_c7c1v5qw_.log Name:
File/oracle/app/oracle/flash_recovery_area/STANDBY/onlinelog/o1_mf_7_c7c1ttf1_.log Name:
File/oracle/app/oracle/flash_recovery_area/STANDBY/onlinelog/o1_mf_8_c7dst287_.log Name:
File/oracle/app/oracle/flash_recovery_area/STANDBY/onlinelog/o1_mf_7_c7dssvfd_.log Name:
File/oracle/app/oracle/flash_recovery_area/STANDBY/onlinelog/o1_mf_9_c7dst8wr_.log Name:
File/oracle/app/oracle/flash_recovery_area/STANDBY/onlinelog/o1_mf_8_c7c1v0ff_.log Name:
File/oracle/app/oracle/flash_recovery_area/STANDBY/archivelog/ Name:Two thousand and fifteen_12_26/o1_mf_1_9_c7wqvrp9_.arc

You really want DoToThe above files catalog (YES enterOrYES) NO?
Files cataloging...
Done Cataloging

ListOfFiles Cataloged
=======================
File/oracle/app/oracle/flash_recovery_area/STANDBY/archivelog/ Name:Two thousand and fifteen_12_26/o1_mf_1_9_c7wqvrp9_.arc

ListOfWhich Where FilesNotCataloged
=======================================
File/oracle/app/oracle/flash_recovery_area/STANDBY/onlinelog/o1_mf_9_c7c1v5qw_.log Name:
RMAN-07529Catalog Reason:Is NotSupportedForThisFile Type
File名称:/甲骨文/应用程序/ Oracle / flash_recovery_area /待机/ onlinelog / o1_mf_7_c7c1ttf1_。日志
RMAN—07529原因:目录 支持对于文件 
文件名称:/甲骨文/应用程序/ Oracle / flash_recovery_area /待机/ onlinelog / o1_mf_8_c7dst287_。日志
RMAN—07529原因:目录 支持对于文件 
文件名称:/甲骨文/应用程序/ Oracle / flash_recovery_area /待机/ onlinelog / o1_mf_7_c7dssvfd_。日志
RMAN—07529原因:目录 支持对于文件 
文件名称:/甲骨文/应用程序/ Oracle / flash_recovery_area /待机/ onlinelog / o1_mf_9_c7dst8wr_。日志
RMAN—07529原因:目录 支持对于文件 
文件名称:/甲骨文/应用程序/ Oracle / flash_recovery_area /待机/ onlinelog / o1_mf_8_c7c1v0ff_。日志
RMAN—07529原因:目录 支持对于文件 

RMAN >出口

然后进入SQL命令查看:

SQL >选择 序列#,应用V archived_log美元秩序 通过 序列#ASC序列#应用
---------- ---------
     没有

SQL >

3、之后开关切换日志测试

主库:

SQL >已更改系统;

系统改变。

SQL >选择 序列#,应用V archived_log美元秩序 通过 序列#ASC序列#应用
---------- ---------
     没有
    没有
    没有

SQL >

从库:

SQL >选择 序列#,应用V archived_log美元秩序 通过 序列#ASC序列#应用
---------- ---------
     可以
    可以

SQL >

看到两边归档日志以及被应用情况都一致了。

猜你在找
查看评论
*以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:99999 4次
    • 积分:一万六千零四十九
    • 等级:
    • 排名:319名第
    • 原创:438篇
    • 转载:3篇
    • 译文:2篇
    • 评论:523条
    我的课程
    博客专栏
    技术网址连接
    http://dev.mysql.com/doc/
    文章分类
    文章存档
    Latest comments