rac庫與單機physical standby 之間的switchover
Rac 操作:
關閉 22 節點:
SQL> select NAME ,DB_UNIQUE_NAME ,open_mode,DATABASE_ROLE,PROTECTION_MODE from v$database;
NAME DB_UNIQUE_NAME OPEN_MODE DATABASE_ROLE
--------- ------------------------------ ---------- ----------------
PROTECTION_MODE
--------------------
HELLODB std01 READ WRITE PRIMARY
MAXIMUM PERFORMANCE
SQL> SQL>
SQL>
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down
21 節點
SQL> SELECT * FROM V$DATAGUARD_STATS;
no rows selected
SQL> SQL>
SQL> select NAME ,DB_UNIQUE_NAME ,open_mode,DATABASE_ROLE,PROTECTION_MODE from v$database;
NAME DB_UNIQUE_NAME OPEN_MODE DATABASE_ROLE PROTECTION_MODE
--------- ------------------------------ ---------- ---------------- --------------------
HELLODB std01 READ WRITE PRIMARY MAXIMUM PERFORMANCE
SQL> SQL>
SQL>
SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;
SWITCHOVER_STATUS
--------------------
TO STANDBY
SQL> SQL>
SQL>
SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY WITH SESSION SHUTDOWN;
Database altered.
SQL> SQL> SQL>
SQL>
SQL> shutdown immediate;
ORA-01507: database not mounted
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.
Total System Global Area 4294967296 bytes
Fixed Size 2101808 bytes
Variable Size 788532688 bytes
Database Buffers 3489660928 bytes
Redo Buffers 14671872 bytes
Database mounted.
SQL> alter database recover managed standby database disconnect from session using current logfile;
Database altered.
單機52 操作
SQL> select NAME ,DB_UNIQUE_NAME ,open_mode,DATABASE_ROLE from v$database;
NAME DB_UNIQUE_NAME OPEN_MODE DATABASE_ROLE
--------- ------------------------------ ---------- ----------------
HELLODB pri MOUNTED PHYSICAL STANDBY
1 row selected.
SQL> SQL>
SQL>
SQL> recover managed standby database disconnect from session;
Media recovery complete.
SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;
SWITCHOVER_STATUS
--------------------
SESSIONS ACTIVE
1 row selected.
SQL> SQL>
SQL>
SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY;
ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY
*
ERROR at line 1:
ORA-01013: user requested cancel of current operation
SQL> alter database recover managed standby database cancel;
Database altered.
SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY;
Database altered.
SQL> ALTER DATABASE OPEN;
Database altered.
SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;
SWITCHOVER_STATUS
--------------------
TO STANDBY
1 row selected.
SQL> select NAME ,DB_UNIQUE_NAME ,open_mode,DATABASE_ROLE from v$database;
NAME DB_UNIQUE_NAME OPEN_MODE DATABASE_ROLE
--------- ------------------------------ ---------- ----------------
HELLODB pri READ WRITE PRIMARY
1 row selected.
SQL> alter system switch logfile;
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/758322/viewspace-680902/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Physical Standby Switchover_status Showing Not Allowed. (Doc ID 1392763.1)
- DataGuard---->物理StandBy的角色切換之switchover
- Convert a Physical Standby Database into a Snapshot Standby DatabaseDatabase
- Performing a Failover to a Physical Standby DatabaseORMAIDatabase
- Oracle 12.2 physical standby備庫收集AWR報告Oracle
- 【DG】Data Guard搭建(physical standby)
- Oracle DG建立Physical Standby DatabaseOracleDatabase
- 搭建windows到linux的oracle 12c physical standby備庫WindowsLinuxOracle
- Oracle 12C RAC的單機Standby returning error ORA-16191OracleError
- openGauss主備切換之switchover與failoverAI
- 單例項Primary快速搭建Standby RAC參考手冊(19.16 ADG)單例
- [20180423]表空間閃回與snapshot standby
- Oracle搭建rac到單庫的adgOracle
- DM7 RAC資料庫恢復成單機資料庫資料庫
- Oracle RAC+DG 調整redo/standby log fileOracle
- [20230425]注意snapshot standby與activate standby的區別.txt
- RAC恢復到單機
- Oracle:DG 的 switchoverOracle
- 【DG】Data Guard主備庫Switchover切換
- Networker恢復oracle rac到單機Oracle
- 簡單探討JavaScript 與 TypeScript之間的聯絡JavaScriptTypeScript
- 簡單介紹HTTP與HTTPS之間的區別HTTP
- RAC之資料庫軟體安裝資料庫
- 機器學習之支援向量與間隔機器學習
- 倉與倉、倉與車、車與訂單等之間的精準對接等
- 主庫到standby報錯解決:Error 12154 received logging on to the standby ORA-12154Error
- 如何修改rac的系統時間
- Javascript與Python之間的程序間通訊JavaScriptPython
- 簡單介紹Oracle 19c RAC 手工建庫的過程Oracle
- 12.1.0.2 單機 升級 19.16 RAC步驟詳解
- oracle 19c&21c 單機/RAC手工清理Oracle
- 虛擬主機資料庫與空間關係資料庫
- 大資料分析與機器學習之間的區別與聯絡大資料機器學習
- Oracle的快照standbyOracle
- Oracle與OpenJDK之間的區別OracleJDK
- GCD與NSOperation之間的區別GC
- Flutter與android之間的通訊FlutterAndroid
- oracle rac資料庫的安裝Oracle資料庫
- 4 Creating a Logical Standby Database 建立邏輯備庫Database