ITPub博客

首页 > 数据库 > Oracle > DataGuard 错误 ORA-19527

DataGuard 错误 ORA-19527

原创 Oracle 作者:ddba 时间:2019-04-28 14:09:06 0 删除 编辑
摘自http://www.itpub.net/695613,1.html[@more@]

问题陈述
dataguard为physical、maximum availability、real_time apply模式
主机在线日志和standby日志为:
3 ONLINE /u02/oracle/oradata/oract/redo03.log NO
2 ONLINE /u02/oracle/oradata/oract/redo02.log NO
1 ONLINE /u02/oracle/oradata/oract/redo01.log NO
4 STANDBY /u02/oracle/oradata/oract/standby01A.log NO
5 STANDBY /u02/oracle/oradata/oract/standby02A.log NO
6 STANDBY /u02/oracle/oradata/oract/standby03A.log NO
7 STANDBY /u02/oracle/oradata/oract/standby04A.log NO
4 STANDBY /u02/oracle/oradata/oract/standby01B.log NO
5 STANDBY /u02/oracle/oradata/oract/standby02B.log NO
6 STANDBY /u02/oracle/oradata/oract/standby03B.log NO
7 STANDBY /u02/oracle/oradata/oract/standby04B.log

standby机在线日志和standby 日志为:
3 ONLINE /u02/oracle/oradata/oract/redo03.log NO
2 ONLINE /u02/oracle/oradata/oract/redo02.log NO
1 ONLINE /u02/oracle/oradata/oract/redo01.log NO
4 STANDBY /u02/oracle/oradata/oract/standby01A.log NO
5 STANDBY /u02/oracle/oradata/oract/standby02A.log NO
6 STANDBY /u02/oracle/oradata/oract/standby03A.log NO
7 STANDBY /u02/oracle/oradata/oract/standby04A.log NO
4 STANDBY /u02/oracle/oradata/oract/standby01B.log NO
5 STANDBY /u02/oracle/oradata/oract/standby02B.log NO
6 INVALID STANDBY /u02/oracle/oradata/oract/standby03B.log NO
7 INVALID STANDBY /u02/oracle/oradata/oract/standby04B.log

LOG_FILE_NAME_CONVERT 没有设置
在standby机器启动后总是报如下错误:
ORA-19527: physical standby redo log must be renamed
ORA-00312: online log 1 thread 1: '/u02/oracle/oradata/oract/redo01.log'

解决办法
$ oerr ora 19527
19527, 00000, "physical standby redo log must be renamed"
// *Cause: The CLEAR LOGFILE command was used at a physical standby
// database. This command cannot be used at a physical standby
// database unless the LOG_FILE_NAME_CONVERT initialization
// parameter is set. This is required to avoid overwriting
// the primary database's logfiles.
// *Action Set the LOG_FILE_NAME_CONVERT initialization parameter.


没什么特别的操作,现在dataguard运行正常,只是每次standby启动alter database recover managed standby database using current logfile disconnect from session 或者 alter database recover managed standby database disconnect from session 的时候都会在警报日志里面有上述警报

另:
我的standby机器 v$standby_log 现实好像只有一组standby日志被应用过

SQL> select * from v$standby_log;

GROUP# DBID THREAD# SEQUENCE# BYTES USED ARCHIVED STATUS FIRST_CHANGE# FIRST_TIME LAST_CHANGE# LAST_TIME
---------- ---------------------------------------- ---------- ---------- ---------- ---------- -------- ---------- ------------- ----------- ------------ -----------
4 UNASSIGNED 1 0 52428800 512 NO UNASSIGNED 0 0
5 1257885094 1 50 52428800 183808 YES ACTIVE 552319 2006-12-28 552619 2006-12-28
6 UNASSIGNED 0 0 52428800 512 YES UNASSIGNED 0 0
7 UNASSIGNED 0 0 52428800 512 YES UNASSIGNED 0 0


Physical Standby Database mounted.
Completed: ALTER DATABASE MOUNT
ARC9 started with pid=25, OS id=8925
Thu Dec 28 14:23:57 2006
alter database recover managed standby database using current logfile disconnect from session
Thu Dec 28 14:23:58 2006
Attempt to start background Managed Standby Recovery process (oract)
MRP0 started with pid=26, OS id=8928
Thu Dec 28 14:23:59 2006
MRP0: Background Managed Standby Recovery process started (oract)
Managed Standby Recovery starting Real Time Apply
Clearing online redo logfile 1 /u02/oracle/oradata/oract/redo01.log
Clearing online log 1 of thread 1 sequence number 50
Thu Dec 28 14:24:04 2006
Completed: alter database recover managed standby database using current logfile disconnect from session
Thu Dec 28 14:24:08 2006
Clearing online redo logfile 1 complete
Clearing online redo logfile 2 /u02/oracle/oradata/oract/redo02.log
Clearing online log 2 of thread 1 sequence number 49
Clearing online redo logfile 2 complete
Clearing online redo logfile 3 /u02/oracle/oradata/oract/redo03.log
Clearing online log 3 of thread 1 sequence number 50
Clearing online redo logfile 3 complete
Thu Dec 28 14:24:16 2006
Recovery of Online Redo Log: Thread 1 Group 5 Seq 50 Reading mem 0
Mem# 0 errs 0: /u02/oracle/oradata/oract/standby02A.log
Mem# 1 errs 0: /u02/oracle/oradata/oract/standby02B.log

做法是设置 LOG_FILE_NAME_CONVERT='/u02/oracle/oradata/oract/','/u02/oracle/oradata/oract/'
因为主备机分离而且目录结构完全一致所以设置LOG_FILE_NAME_CONVERT就不会再提示警告了
现在想想感觉警告主要是提示在主备同机情况下避免清除主机在线日志的


一开始我就是用的copy方式建立的standby,所以所有的转换参数都没有设置。

出现这个问题可以考虑在Standby 端临时设置一下 LOG_FILE_NAME_CONVERT ,清掉日志后,不报错误后可以把这个参数设置回去

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7794469/viewspace-886828/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2006-09-21

  • 博文量
    31
  • 访问量
    23937