This topic describes the switchover and failover operations.
OceanBase Database provides two cluster roles: PRIMARY and PHYSICAL STANDBY. You can dynamically change the role of the current cluster through a switchover or a failover.
Switchover
A switchover allows you to exchange the roles of the primary cluster and a standby cluster without data loss.
A switchover involves two stages: switching the primary cluster to the standby role and switching the standby cluster to the primary role.
Failover
A failover allows you to switch a standby cluster to the primary role when the primary cluster is unavailable.
You can perform a switchover or a failover by using SQL commands.