Oracle DataGuard 常用命令備忘
--Start Standby Database
startup nomount
alter database mount standby database;
alter database recover managed standby database disconnect;
--Disable/Enable archive log destinations
alter system set log_archive_dest_state_2 = 'defer';
alter system set log_archive_dest_state_2 = 'enable';
--To remove a delay from a standby
alter database recover managed standby database cancel;
alter database recover managed standby database nodelay disconnect;
--Stop and Start of Logical standby apply
alter database stop logical standby apply;
alter database start logical standby apply;
--Physical Standby switchover:
In Primary Database:
ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY;
或 ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY WITH SESSION SHUTDOWN;
SHUTDOWN IMMEDIATE;
STARTUP NOMOUNT;
ALTER DATABASE MOUNT STANDBY DATABASE;
In standby Database:
ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY;
或 ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY WITH SESSION SHUTDOWN;
SHUTDOWN IMMEDIATE;
STARTUP;
In Primary Database:
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;
--If the primary Database is down,we can use fllowing step to active standby database:
Alter DATABASE RECOVER MANAGED STANDBY DATABASE FINISH;
或 Alter DATABASE RECOVER MANAGED STANDBY DATABASE FINISH FORCE;
FORCE關鍵字將會停止當前活動的RFS程式,以便立刻執行failover。
Alter DATABASE COMMIT TO SWITCHOVER TO PRIMARY;
SHUTDOWN IMMEDIATE;
STARTUP;
Register missing archive log file
Find archive log gap by query:
SELECT THREAD#, LOW_SEQUENCE#, HIGH_SEQUENCE# FROM V$ARCHIVE_GAP;
register using:
ALTER DATABASE REGISTER PHYSICAL LOGFILE 'filespec1';
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/7478833/viewspace-563274/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Git 常用命令備忘Git
- Git常用命令備忘Git
- Docker 常用命令備忘錄Docker
- linux 常用命令備忘Linux
- vi常用命令備忘錄
- Oracle job備忘Oracle
- 【DataGuard】手工冷備搭建 Oracle 11g DataGuard 物理備庫Oracle
- 「備忘錄」60+Git常用命令列Git命令列
- GNU/Linux 常用命令與工具備忘Linux
- oracle備份常用命令Oracle
- Oracle DataGuard 主備切換 (switchover) oracle11gOracle
- 【DATAGUARD】Oracle Dataguard物理備庫切換最佳實踐(sqlplus)OracleSQL
- 【DataGuard】Oracle 11g DataGuard 角色轉換(一)物理備庫SwitchoverOracle
- RunLoop備忘OOP
- Vuepress 備忘Vue
- MySQL備忘MySql
- JS備忘JS
- SQL備忘SQL
- 備忘錄
- 【備忘錄】
- Oracle11gDATAGUARD相關檢視備忘Oracle
- 使用RMAN備份集搭建Oracle Dataguard Step by Step(一)Oracle
- 使用RMAN備份集搭建Oracle Dataguard Step by Step(二)Oracle
- oracle利用scn增量備份來實現同步dataguardOracle
- oracle dataguardOracle
- ORACLE DATAGUARD 資料庫---建立物理備用資料庫Oracle資料庫
- HTTPS備忘HTTP
- 備忘錄模式模式
- Git使用備忘Git
- iOS備忘錄iOS
- JUnit備忘錄
- CSS備忘錄CSS
- VITUALBOX備忘
- ApplicationDomain 備忘APPAI
- jsfl 備忘JS
- tmux使用備忘UX
- Docker代理備忘Docker
- RabbitMQ備忘錄MQ