Errors in file /u01/app/oracle/diag/rdbms/felixdg/felixdg/trace/felixdg_mrp0_3283.trc:
ORA-19527: physical standby redo log must be renamed
ORA-00312: online log 1 thread 1: '/u02/oradata/felixdb/redo01_01.log'
Clearing online redo logfile 1 complete
在os中查了一下:
[oracle@felixdb ~]$ 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 log files.
// *Action Set the LOG_FILE_NAME_CONVERT initialization parameter.
找到了一段正式的解释
Cause
This is in fact an enhancement to the Dataguard product in 10gR2 ..
The goal here is to improve speed of switchover. Before this a switchover would require to clear the online logfiles before we can become a primary. In this release we attempt to clear the online logfiles when starting Managed Recovery.
If the files exist then they will be cleared, but if they do not exist we report the error and the MRP does not fail.
As an extra enhancement if the online redo logs do exist you must specify the log_file_name_convert parameter even if there is no difference in the name. This has been implemented to reduce the chances that the primary online redo logs are cleared when MRP starts. It is the equivalent of asking - Are you sure you want the logs to be called this....
If the log_file_name_convert parameter is not set then the ORA-19527 is reported and the log file is not cleared at this time..
Solution
Solution to stop both of these errors is to create the online redo logs and ensure log_file_name_convert is set.
这是
10g以后,
oracle为了加快swtichover的速度,在can become a primary之前就去clear the online logfiles了,而如果没有设置log_file_name_convert,这个时候oracle可能就不认识哪怕是你copy过来的一模一样的logfile了
这个说法也在taobao dba team的blog中得到证实:
解决的办法就是设置log_file_name_convert参数,其实这个standby库建立的时候就是从primary冷备copy过来的文件,路径也完全一样。
alter system set log_file_name_convert='/u02/oradata/felixdb/','/u02/oradata/felixdb/' scope=spfile;
当设置完成,重启standby,apply日志以后,看到后台中果然可以clear了online logfiles,也就没有了问题
Thu Jul 01 05:53:33 2010
RFS[2]: Assigned to RFS process 13528
RFS[2]: Identified database type as 'physical standby': Client is LGWR ASYNC pid 2989
Primary database is in MAXIMUM PERFORMANCE mode
RFS[2]: Selected log 4 for thread 1 sequence 48 dbid -1982381393 branch 721203505
RFS[2]: Selected log 5 for thread 1 sequence 49 dbid -1982381393 branch 721203505
Archived Log entry 40 added for thread 1 sequence 48 ID 0x89d73faf dest 2:
Serial Media Recovery started
Managed Standby Recovery not using Real Time Apply
Waiting for all non-current ORLs to be archived...
All non-current ORLs have been archived.
Clearing online redo logfile 1 /u02/oradata/felixdb/redo01_01.log
Clearing online log 1 of thread 1 sequence number 49
Thu Jul 01 05:53:39 2010
Completed: alter database recover managed standby database disconnect from session
Thu Jul 01 05:53:43 2010
Clearing online redo logfile 1 complete
Clearing online redo logfile 2 /u02/oradata/felixdb/redo02_01.log
Clearing online log 2 of thread 1 sequence number 47
Clearing online redo logfile 2 complete
Clearing online redo logfile 3 /u02/oradata/felixdb/redo03_01.log
Clearing online log 3 of thread 1 sequence number 48
Clearing online redo logfile 3 complete
Media Recovery Log /u02/stdlog/felixdbArc_1_48_721203505.arc
Media Recovery Waiting for thread 1 sequence 49 (in transit)
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/22123669/viewspace-671947/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/22123669/viewspace-671947/