欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  数据库

Oracle 11G DataGuard ORA-16086问题修复详细过程

程序员文章站 2024-01-23 15:34:52
...

Oracle 11G DataGuard ORA-16086问题修复详细过程

1,问题描述,standby从库没有应用redo日志
Tue Jul 22 09:05:07 2014
RFS[8852]: Assigned to RFS process 12956
RFS[8852]: Identified database type as 'physical standby': Client is ARCH pid 16028
Tue Jul 22 09:05:09 2014
RFS[8853]: Assigned to RFS process 12958
RFS[8853]: Identified database type as 'physical standby': Client is LGWR SYNC pid 15950
Primary database is in MAXIMUM AVAILABILITY mode
Standby controlfile consistent with primary
Standby controlfile consistent with primary
RFS[8853]: No standby redo logfiles selected (reason:7)
Errors in file /Oracle/app/oracle/diag/rdbms/pddgunq/powerdes/trace/powerdes_rfs_12958.trc:
ORA-16086: Redo data cannot be written to the standby redo log
Tue Jul 22 09:11:07 2014
RFS[8854]: Assigned to RFS process 12976
RFS[8854]: Identified database type as 'physical standby': Client is ARCH pid 16028
Tue Jul 22 09:11:07 2014
RFS[8855]: Assigned to RFS process 12978
RFS[8855]: Identified database type as 'physical standby': Client is LGWR SYNC pid 15950
Primary database is in MAXIMUM AVAILABILITY mode
Standby controlfile consistent with primary
Standby controlfile consistent with primary
RFS[8855]: No standby redo logfiles selected (reason:7)
Errors in file /oracle/app/oracle/diag/rdbms/pddgunq/powerdes/trace/powerdes_rfs_12978.trc:
ORA-16086: Redo data cannot be written to the standby redo log

在CentOS 6.4下安装Oracle 11gR2(x64)

Oracle 11gR2 在VMWare虚拟机中安装步骤

Debian 下 安装 Oracle 11g XE R2

Oracle Data Guard 重要配置参数

基于同一主机配置 Oracle 11g Data Guard

探索Oracle之11g DataGuard

Oracle Data Guard (RAC+DG) 归档删除策略及脚本

Oracle Data Guard 的角色转换

Oracle Data Guard的日志FAL gap问题

Oracle 11g Data Guard Error 16143 Heartbeat failed to connect to standby 处理方法

2,在从库查看redo日志息
SQL> show parameter log_file_name_convert;

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_file_name_convert string /home/oradata/powerdes, /home/
oradata/powerdes
SQL>
SQL>
SQL> select group#,member from v$logfile;

GROUP#
----------
MEMBER
--------------------------------------------------------------------------------
3
/home/oradata/powerdes/redo03.log

2
/home/oradata/powerdes/redo02.log

1
/home/oradata/powerdes/redo01.log


SQL> select GROUP#,FIRST_CHANGE#,SEQUENCE#,STATUS from v$log;

GROUP# FIRST_CHANGE# SEQUENCE# STATUS
---------- ------------- ---------- ----------------
1 1.0533E+10 23999 CLEARING_CURRENT
2 1.0533E+10 23997 CLEARING
3 1.0533E+10 23998 CLEARING

SQL>


SQL> select group#,bytes/1024/1024,members,status from v$log;

GROUP# BYTES/1024/1024 MEMBERS STATUS
---------- --------------- ---------- ----------------
1 50 1 CLEARING
2 50 1 CLEARING_CURRENT
3 50 1 CLEARING

SQL>

先暂停redo log日志:
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;

执行更新日志操作:
alter database clear logfile group 1;
alter database clear logfile group 2;
alter database clear logfile group 3;

SQL> alter database clear logfile group 1;
alter database clear logfile group 1
*
ERROR at line 1:
ORA-01156: recovery or flashback in progress may need access to files

报错是因为MFS进程锁定日志了,所以需要先停应用再更新日志操作
alter database recover managed standby database cancel;
SQL> alter database recover managed standby database cancel;
Database altered.
SQL> alter database clear logfile group 1;
Database altered.
SQL> alter database clear logfile group 2;
Database altered.
SQL> alter database clear logfile group 3;
Database altered.
SQL>

然后再执行redo应用
SQL> alter database recover managed standby database disconnect from session;
Database altered.
SQL>

查看redo应用情况
SQL> select name,creator,sequence#,applied,completion_time from v$archived_log;
都是NO

更多详情见请继续阅读下一页的精彩内容:

Oracle 11G DataGuard ORA-16086问题修复详细过程