1)Switchover
Swithchover通常都是人为的有计划的进行角色互换,比如升级等。它通常都是无损的,即不会有数据丢失。其执行主要分为两个阶段:
1.Primary转为Standby
2.Standby之一转为Primary
2)Failover
Failover是指由于Primary故障无法短时间恢复,Standby不得不充当Primay的角色,如果处于最高性能模式,这种切换很有可能导致数据丢失。
DGMGRL> switchover to dg;
Performing switchover NOW, please wait...
Operation requires a connection to instance "dg" on database "dg"
Connecting to instance "dg"...
Connected.
New primary database "dg" is opening...
Operation requires startup of instance "orcl" on database "orcl"
Starting instance "orcl"...
ORACLE instance started.
Database mounted.
Database opened.
Switchover succeeded, new primary is "dg"
DGMGRL> show configuration
Configuration - orcl
Protection Mode: MaxPerformance
Databases:
dg - Primary database
orcl - Physical standby database
Fast-Start Failover: DISABLED
Configuration Status:
SUCCESS