ORA-10458 ORA-01196 ORA-01110 处理

今天有个dataguard库,启动备库的时候报错:

ERROR at line 1:
ORA-10458: standby database requires recovery
ORA-01196: file 1 is inconsistent due to a failed media recovery session
ORA-01110: data file 1: '/oradata/prov/system01.dbf'

原因:日志的scn跟控制文件不一致导致

1、主库可以正常起来,并正常启动主库的监听,确保主库监听正常。

2、备库启动到mount阶段,并启动备库的监听,确保备库的监听也正常。

3、备库启动日志应用:

SQL> alter database recover managed standby database disconnect from session;

Database altered.

4、检查主库日志序号:

select name,SEQUENCE#,APPLIED from v$archived_log order by sequence#;

ORA-10458 ORA-01196 ORA-01110 处理_第1张图片

检查备库alert日志:

ORA-10458 ORA-01196 ORA-01110 处理_第2张图片

日志的最后一个序号跟主库检查的一致即可。

5、备库停止应用日志

SQL> alter database recover managed standby database cancel
  2  ;

Database altered.
 

6、备库启动到open并再次应用日志

SQL> alter database open
  2  ;

Database altered.

SQL> alter database recover managed standby database using current logfile disconnect from session;

Database altered.

Mos上的参考文档
Open Standby Database Fails due to ORA-1110/ORA-1196/ORA-10458 (文档 ID 2047793.1)




Problem happens with following conditions.
    Physical Standby Database
    Standby Database is terminated
    Standby Controlfile is re-created or restored from backup
    Try to Open Standby Database as READ ONLY mode


CAUSE


This is an expected limitation.
When Standby Database is terminated and standby controlfile must be restored, crash recovery is required 


to open Standby Database as READ ONLY.
But datafiles remains as FUZZY, and it is not recoverable.


Solution


Restore backup of all datafiles and control files when standby controlfile must be restored and the 


Standby Database crashed before

你可能感兴趣的:(dataguard,oracle12.2,dataguard,oracle12c)