os: Redhat 7.2 db: oracle 11.2.0.4.0
SQL> startup; ORACLE instance started. Total System Global Area 764121088 bytes Fixed Size 2257152 bytes Variable Size 452988672 bytes Database Buffers 301989888 bytes Redo Buffers 6885376 bytes Database mounted. ORA-10458: standby database requires recovery ORA-01196: file 1 is inconsistent due to a failed media recovery session ORA-01110: data file 1: '/home/oracle/app/oradata/sbdb/system01.dbf'解决办法:恢复 physical standby 从备库上操作,启动到mount状态,启动恢复
SQL> shutdown immediate; SQL> startup mount; SQL> recover managed standby database using current logfile disconnect from session;主库上操作,产生几个归档(一定要求确保 v a r c h i v e d e s t 的 s t a t u s 列 为 ‘ V A L I D ’ ) 用 ‘ s e l e c t ∗ f r o m v archive_dest 的 status 列为 ‘VALID’) 用` select * from v archivedest的status列为‘VALID’)用‘select∗fromvarchive_dest where destination is not null;`查询 在linux查询不太好看 建议 在第三方工具查询 status 列改为 ‘VALID’
SQL> alter system archive log current; SQL> alter system checkpoint; SQL> alter system archive log current; SQL> select * from v$archive_dest where destination is not null;在主库上查询一下归档情况:
SQL> select name,sequence#,archived,applied from v$archived_log order by sequence#;如果返回结果 ‘APPLIED’ 都是 ‘YES’ 或者只有最后一个是 'NO’的话,说明全部归档日志全部已经归档完了.(这里的全部代表备库的) 备库上操作
SQL> alter database recover managed standby database cancel; SQL> alter database open;如果数据库正常打开了,且如果是通过 sqlplus 手动配置的 dataguard,就执行如下命令(开启同步 两条命令效果相同)
SQL>alter database recover managed standby database using current logfile disconnect from session; SQL>alter database recover managed standby database using current logfile disconnect;到这里你就完成了,备库的启动!!!!