ORA-16217: prepare to switchover has not completed

tolilong發表於2013-03-20
在執行logical standby switchover的時候,出現了
ORA-16217: prepare to switchover has not completed錯誤.

[@more@]
SQL> alter database prepare to switchover to logical standby;

Database altered.
SQL> select switchover_status from v$database;

SWITCHOVER_STATUS
--------------------
PREPARING SWITCHOVER
SQL> alter database commit to switchover to logical standby;
alter database commit to switchover to logical standby
*
ERROR at line 1:
ORA-16217: prepare to switchover has not completed
ORA-06512: at line 1
原來是在standby database中沒有設定
log_archive_dest_n='service=asm lgwr sync affirm valid_for=(all_logfiles,all_roles) db_unique_name=asm'導致的,
其中log_archive_dest_state_n等引數設定有誤,也會導致這個錯誤的。
在standby database上
SQL> alter system set log_archive_dest_3='service=asm lgwr sync affirm valid_for=(all_logfiles,all_roles) db_unique_name=asm';

System altered.
然後在pirmary database上
SQL> alter database prepare to switchover to logical standby;

Database altered.
SQL> select switchover_status from v$database;

SWITCHOVER_STATUS
--------------------
TO LOGICAL STANDBY

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

相關文章