MRP process getting terminated with error ORA-10485 (Doc ID 1618485.1)
1. 问题现象
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT
Attempt to start background Managed Standby Recovery process (1)
....
....
MRP0: Background Media Recovery terminated with error 10485
Errors in file /u01/app/oracle/diag/rdbms//1/trace/1_pr00_XXXXX.trc:
ORA-10485: Real-Time Query cannot be enabled while applying migration redo.
Managed Standby Recovery not using Real Time Apply
Recovery interrupted!
Reconfiguration started (old inc 18, new inc 20)
2. 原因
在主库进行升级时候,备库不能开启实时查询
ORA-10485: Real-Time Query cannot be enabled while applying migration redo.
The Real-Time Query feature was enabled when an attempt was made to recover through migration redo generated during primary upgrades or downgrades
3. 解决方案
3.1 Oracle 11G版本
-- 1. 停止备库恢复进程
alter database recover managed standby database disconnect ;
-- 2. 将备库启动到mount状态
shutdown immediate;
startup mount;
-- srvctl command
srvctl stop database -d orcl -i orcl1
srvctl start instance -d orcl -i orcl1 -o mount
-- 3. 在主库可以切换日志,并等待所有重做应用到备库
-- 4. 在备库开启实时应用
alter database recover managed standby database cancel;
alter database open;
alter database recover managed standby database using current logfile disconnect from session;
3.2 Oracle 12C
在12C中,默认使用实时日志应用模式,不管是否还有'using current logfile'选项
-- 1. 在备库非实时应用模式启动MRP进程
alter database recover managed standby database using archived logfile disconnect;
-- 2. 若1执行失败时,使用下面命令
recover standby database;
-- Type AUTO