签到成功

知道了

CNDBA社区CNDBA社区

Oracle 11g Data Guard ORA-16058 错误处理

2020-12-20 11:19 704 0 原创 Oracle 11g
作者: Dave

采用RMAN 备份恢复搭建Oracle 11g的Data Guard,恢复结束之后,DG 同步一直异常,主库提示如下信息:https://www.cndba.cn/dave/article/4330https://www.cndba.cn/dave/article/4330

SQL>  select DEST_NAME,STATUS,PROCESS,ERROR,TRANSMIT_MODE from v$archive_dest WHERE TARGET='STANDBY';

DEST_NAME
--------------------------------------------------------------------------------
STATUS    PROCESS
--------- ----------
ERROR                                                             TRANSMIT_MOD
----------------------------------------------------------------- ------------
LOG_ARCHIVE_DEST_2
ERROR     LGWR
ORA-16058: standby database instance is not mounted               PARALLELSYNC

备库在open 时又提示GAP:

Sun Dec 20 10:40:42 2020
Standby crash recovery need archive log for thread 1 sequence 4 to continue.
Please verify that primary database is transporting redo logs to the standby database.
Wait timeout: thread 1 sequence 4
Standby crash recovery aborted due to error 16016.
Errors in file /u01/app/oracle/diag/rdbms/cd/cd/trace/cd_ora_26198.trc:
ORA-16016: archived log for thread 1 sequence# 4 unavailable
Recovery interrupted!
Completed standby crash recovery.
Errors in file /u01/app/oracle/diag/rdbms/cd/cd/trace/cd_ora_26198.trc:
ORA-10458: standby database requires recovery
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: '/u01/app/oracle/oradata/CD_PD/datafile/o1_mf_system_hxs5rcpc_.dbf'
ORA-10458 signalled during: alter database open...
Sun Dec 20 10:44:01 2020
alter database open
Beginning standby crash recovery.
Serial Media Recovery started
Managed Standby Recovery starting Real Time Apply
Media Recovery Waiting for thread 1 sequence 4
Fetching gap sequence in thread 1, gap sequence 4-4
Sun Dec 20 10:45:03 2020
Standby crash recovery need archive log for thread 1 sequence 4 to continue.
Please verify that primary database is transporting redo logs to the standby database.
Wait timeout: thread 1 sequence 4
Standby crash recovery aborted due to error 16016.
Errors in file /u01/app/oracle/diag/rdbms/cd/cd/trace/cd_ora_26198.trc:
ORA-16016: archived log for thread 1 sequence# 4 unavailable
Recovery interrupted!
Completed standby crash recovery.
Errors in file /u01/app/oracle/diag/rdbms/cd/cd/trace/cd_ora_26198.trc:
ORA-10458: standby database requires recovery
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: '/u01/app/oracle/oradata/CD_PD/datafile/o1_mf_system_hxs5rcpc_.dbf'
ORA-10458 signalled during: alter database open...
Sun Dec 20 10:45:43 2020
alter database open

实际上测试备库已经是mount的状态,应该是指备库信息的不一致导致的,所有先关闭备库,重新通过sqlplus 直接启动到mount 状态:https://www.cndba.cn/dave/article/4330

SQL> shutdown immediate
ORA-01109: database not open


Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.

Total System Global Area 5344731136 bytes
Fixed Size                  2237776 bytes
Variable Size            1895828144 bytes
Database Buffers         3388997632 bytes
Redo Buffers               57667584 bytes
Database mounted.
SQL> a

将缺失的归档scp 传到备库并注册:

https://www.cndba.cn/dave/article/4330
https://www.cndba.cn/dave/article/4330https://www.cndba.cn/dave/article/4330https://www.cndba.cn/dave/article/4330

[oracle@cd2 archivelog]$ rman target /

Recovery Manager: Release 11.2.0.3.0 - Production on Sun Dec 20 11:05:08 2020

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: CD (DBID=1880941554, not open)

RMAN>  catalog start with '/u01/archivelog';

using target database control file instead of recovery catalog
searching for all files that match the pattern /u01/archivelog

List of Files Unknown to the Database
=====================================
File Name: /u01/archivelog/1_6_1059608430.arc
File Name: /u01/archivelog/1_8_1059608430.arc
File Name: /u01/archivelog/1_10_1059608430.arc
File Name: /u01/archivelog/1_7_1059608430.arc
File Name: /u01/archivelog/1_9_1059608430.arc
File Name: /u01/archivelog/1_5_1059608430.arc

Do you really want to catalog the above files (enter YES or NO)? yes
cataloging files...
cataloging done

List of Cataloged Files
=======================
File Name: /u01/archivelog/1_6_1059608430.arc
File Name: /u01/archivelog/1_8_1059608430.arc
File Name: /u01/archivelog/1_10_1059608430.arc
File Name: /u01/archivelog/1_7_1059608430.arc
File Name: /u01/archivelog/1_9_1059608430.arc
File Name: /u01/archivelog/1_5_1059608430.arc

RMAN>

备库启动MRP,同步正常:

https://www.cndba.cn/dave/article/4330
https://www.cndba.cn/dave/article/4330

SQL> alter database recover managed standby database disconnect from session;

Database altered.


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

 SEQUENCE# APPLIED
---------- ---------
         4 YES
        12 YES
        11 YES
         6 YES
         8 YES
        10 YES
         7 YES
         9 YES
         5 YES
        13 IN-MEMORY
        14 NO

11 rows selected.

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

 SEQUENCE# APPLIED
---------- ---------
         4 YES
         5 YES
         6 YES
         7 YES
         8 YES
         9 YES
        10 YES
        11 YES
        12 YES
        13 YES
        14 YES

11 rows selected.

同步正常。https://www.cndba.cn/dave/article/4330

版权声明:本文为博主原创文章,未经博主允许不得转载。

用户评论
* 以下用户言论只代表其个人观点,不代表CNDBA社区的观点或立场
Dave

Dave

关注

人的一生应该是这样度过的:当他回首往事的时候,他不会因为虚度年华而悔恨,也不会因为碌碌无为而羞耻;这样,在临死的时候,他就能够说:“我的整个生命和全部精力,都已经献给世界上最壮丽的事业....."

  • 1902
    原创
  • 2
    翻译
  • 456
    转载
  • 131
    评论
  • 访问:3641945次
  • 积分:3137
  • 等级:核心会员
  • 排名:第1名
精华文章
    最新问题
    查看更多+
    热门文章
      热门用户
      推荐用户
        Copyright © 2016 All Rights Reserved. Powered by ZhiXinTech · 皖ICP备19020168号·

        QQ交流群