alter database recover managed standbydatabase using current logfile disconnect from session
*
ERROR at line 1:
ORA-01153: an incompatible media recoveryis active
SQL> SQL>
有报错,如下解决
SQL> alter database recover managedstandby database cancel;
Database altered.
SQL>
再查看下是否有未应用的NO的,没有NO的,正常如下:
SQL> select sequence# ,applied fromv$archived_log where applied='NO' order by sequence# ;
no rows selected
SQL>
以open readonly模式打开
SQL> alter database open read only;
Database altered.
SQL>
SQL> select open_mode fromv$database;
OPEN_MODE
--------------------
READ ONLY
SQL>
然后启动应用
SQL> alter database recover managedstandby database disconnect from session;
Database altered.
SQL>
SQL> select open_mode fromv$database;
OPEN_MODE
--------------------
READ ONLY WITH APPLY
SQL>
18,再检查主库备库是否一致
通过以下命令查看:
select sequence#,applied fromv$archived_log order by sequence# asc;
archive log list;
查询最大归档日志序列号:
SELECTSEQUENCE#,to_char(FIRST_CHANGE#),to_char(NEXT_CHANGE#) FROM v$archived_logWHERE SEQUENCE# > 32507 ORDER BY 1;