本案例使用Oracle 12.1.2.0 + Redhat 6.5 x64版本
rman dg切换方式有两种:一种是采用dgmgrl的方式 ,一种是采用手动方式来切换(本案例)
主库:host01 192.0.2.21
备库:host02 192.0.2.22
切换前提条件:
1.dg主备库的切换ADG ,前提条件需要配置standby redo logfile
2.dg三种保护模式的切换 必须要满足log_archive_dest_2 参数配置lgwr sync affirm的方式
一.检查库运行情况
[oracle@host01 ~]$ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Fri Jun 4 23:43:43 2021
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SYS@PROD5>select status,error from v$archive_dest where dest_id=2;
STATUS ERROR
--------- -----------------------------------------------------------------
VALID
SYS@PROD5>select name,open_Mode,database_role from v$database;
NAME OPEN_MODE DATABASE_ROLE
--------- -------------------- ----------------
PROD5 READ WRITE PRIMARY
[oracle@host02 ~]$ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Thu Jun 3 23:37:22 2021
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SYS@PROD5>select process,sequence#,status from v$managed_standby;
PROCESS SEQUENCE# STATUS
--------- ---------- ------------
ARCH 81 CLOSING
ARCH 0 CONNECTED
ARCH 0 CONNECTED
ARCH 82 CLOSING
RFS 83 IDLE
RFS 0 IDLE
RFS 0 IDLE
MRP0 83 APPLYING_LOG
8 rows selected.
主备库运行正常,并且数据同步;
======================================================================&#