oracle 12c主機徹底掛機用failover把備機設定為主機

ywxj_001發表於2022-09-06

單機主備:

單節點主機,備機是物理DG。

主節點徹底掛機,把 物理DG用failover設定為主機。

備機狀態: SQL> select open_mode from v$database; 

OPEN_MODE

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

READ ONLY

SQL> select open_mode from v$database; 

OPEN_MODE

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

READ ONLY

SQL> select switchover_status from v$database;

SWITCHOVER_STATUS

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

NOT ALLOWED SQL> select open_mode,protection_mode,database_role,switchover_status from v$database;

OPEN_MODE      PROTECTION_MODE   DATABASE_ROLE    SWITCHOVER_STATUS

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

READ ONLY      MAXIMUM PERFORMANCE  PHYSICAL STANDBY NOT ALLOWED


開始在備機使用failover:

SQL> shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> startup mount;  

ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance

ORACLE instance started.

Total System Global Area 2147483648 bytes

Fixed Size     3712904 bytes

Variable Size   486541432 bytes

Database Buffers 1644167168 bytes

Redo Buffers    13062144 bytes

Database mounted.

SQL> alter database recover managed standby database finish force;


Database altered.


SQL> select switchover_status from v$database;


SWITCHOVER_STATUS

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

TO PRIMARY


SQL> alter database commit to switchover to primary;


Database altered.

SQL> alter database open;


Database altered.


SQL> select open_mode,protection_mode,database_role,switchover_status from v$database;


OPEN_MODE      PROTECTION_MODE   DATABASE_ROLE    SWITCHOVER_STATUS

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

READ WRITE      MAXIMUM PERFORMANCE  PRIMARY    RESOLVABLE GAP


完成。







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

相關文章