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虚拟机中安装步骤
基于同一主机配置 Oracle 11g Data Guard
Oracle Data Guard (RAC+DG) 归档删除策略及脚本
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