《Oracle DataGuard 常用維護命令參考手冊》

純粹記錄,方便日後參考...

 

純粹記錄,方便日後參考。
文章來源已遺失,如有侵權請麻煩告知! 隨即刪除本文;謝謝。
==================================================
Start Standby Database
startup nomount
alter database mount standby database;
alter database recover managed standby database disconnect;
alter system set log_archive_dest_state_2 = ‘defer’;
alter system set log_archive_dest_state_2 = ‘enable’;

alter database recover managed standby database cancel;
alter database recover managed standby database nodelay disconnect;

alter database stop logical standby apply;
alter database start logical standby apply;
ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY;
SHUTDOWN IMMEDIATE;
STARTUP NOMOUNT;
ALTER DATABASE MOUNT STANDBY DATABASE;
ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY;
SHUTDOWN IMMEDIATE;
STARTUP;
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;
Alter DATABASE RECOVER MANAGED STANDBY DATABASE FINISH;
Alter DATABASE COMMIT TO SWITCHOVER TO PRIMARY;
SHUTDOWN IMMEDIATE;
STARTUP;

SELECT THREAD#, LOW_SEQUENCE#, HIGH_SEQUENCE# FROM V$ARCHIVE_GAP;

ALTER DATABASE REGISTER PHYSICAL LOGFILE ‘logfile';