#物理备用数据库到快照备用数据库
#停快速故障轉移功能
DGMGRL> stop observer
DGMGRL> disable fast_start failover;
DGMGRL> show configuration;
#備庫终止恢复进程
[oracle@DB97 ~]$ sqlplus / as sysdba
SQL> select open_mode from v$database;
READ ONLY WITH APPLY
SQL> alter database recover managed standby database cancel;
SQL> select open_mode from v$database;
READ ONLY
#切换到 snapshot standby
SQL> alter database convert to snapshot standby;
or
DGMGRL> CONVERT DATABASE MPCDB197 to SNAPSHOT STANDBY;
SQL> shutdown immediate;
ORA-01109: database not open
SQL> startup
SQL> select open_mode,database_role from v$database;
READ WRITE SNAPSHOT STANDBY
#數據插入測試,可以正常读写DB,切换完成
#快照备用数据库到物理备用数据库
#備庫
[oracle@DB97 ~]$ sqlplus / as sysdba
SQL> select open_mode,database_role from v$database;
READ WRITE SNAPSHOT STANDBY
SQL> shutdown immediate;
SQL> startup mount;
SQL> alter database convert to physical standby;
or
DGMGRL> CONVERT DATABASE MPCDB197 to PHYSICAL STANDBY;
SQL> shutdown immediate;
ORA-01109: database not open
SQL> startup
SQL> select open_mode,database_role from v$database;
READ ONLY PHYSICAL STANDBY
#稍等片刻再次查詢
SQL> select open_mode,database_role from v$database;
READ ONLY WITH APPLY PHYSICAL STANDBY
#啟動快速故障轉移功能
DGMGRL> enable fast_start failover;
DGMGRL> start observer
or
[oracle@DB229 ~]$ nohup dgmgrl sys/MPCDBMPCDB@SL "start observer file=FSFO.dat">>observer.log 2>&1 &