DG备库启动数据库到open状态报错:
ORA-10458: standby database requires recovery
ORA-01196: file 1 is inconsistent due to a failed media recovery session
ORA-01110: data file 1: '/u01/app/oracle/oradata/rong/system01.dbf'
原因:日志的scn跟控制文件不一致导致
处理步骤:
1、主库可以正常启动,备库启动到mount状态,启动监听,tnsping测试互通
2、备库启用日志应用
alter database recover managed standby database disconnect from session;
3、检查备库alert日志是否有如下应用日志的提示
Attempt to start background Managed Standby Recovery process (rong)
Tue Nov 18 15:33:13 2020
MRP0 started with pid=26, OS id=3933
MRP0: Background Managed Standby Recovery process started (rong)
started logmerger process
Tue Nov 18 15:33:13 2020
Managed Standby Recovery not using Real Time Apply
Parallel Media Recovery started with 24 slaves
Waiting for all non-current ORLs to be archived...
All non-current ORLs have been archived.
Media Recovery Log /u01/app/arch/1_137_899302231.dbf
Media Recovery Waiting for thread 1 sequence 138
Completed: alter database recover managed standby database disconnect from session
并会根据gap里差的日志一致应用到最新的归档
当看到 in transit字样说明已经到最新日志了
Media Recovery Log /u01/app/arch/1_142_899302231.dbf
Media Recovery Waiting for thread 1 sequence 143 (in transit)
4:停止应用日志
alter database recover managed standby database cancel
5:启动到open并再次应用日志
alter database open
alter database recover managed standby database using current logfile disconnect from session;
Mos上的参考文档
Open Standby Database Fails due to ORA-1110/ORA-1196/ORA-10458 (文档 ID 2047793.1)