11g RAC開啟DG的redo實時應用

ywxj_001發表於2017-10-20

檢視oracle主備日誌應用情況:

SQL> select to_char(max(FIRST_TIME),'HH24:MI:SS, yyyy-mm-dd') first_time from v$archived_log where applied='YES';


FIRST_TIME

--------------------

20:57:52, 2018-07-22


在DG上操作:
SQL> select RECOVERY_MODE from v$archive_dest_status where rownum<5;
RECOVERY_MODE
-----------------------
MANAGED
IDLE
IDLE
IDLE

當前沒有實時應用
SQL> select group#,member from v$logfile order by 1;


    GROUP#
----------
MEMBER
--------------------------------------------------------------------------------
         1
/oracle/oradata/standby01.log


         2
/oracle/oradata/standby02.log


         3
/oracle/oradata/standby03.log
有standby.log
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSION;
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSION
*
ERROR at line 1:
ORA-01153: an incompatible media recovery is active

需要先斷開日誌同步:


SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL; 
Database altered.


SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSION;
Database altered.

可以了。
SQL> select RECOVERY_MODE from v$archive_dest_status where rownum<5;


RECOVERY_MODE
-----------------------
MANAGED REAL TIME APPLY
IDLE
IDLE
IDLE

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/22996654/viewspace-2146192/,如需轉載,請註明出處,否則將追究法律責任。

相關文章