This page describes how to perform a switchover to a peer Autonomous Database in Google Cloud. You can perform a switchover through both Google Cloud and OCI.
If the Primary Autonomous Database is down, you can perform a switchover from the peer (Standby) database.
Before you begin
Ensure that you have the following roles and permissions required to perform a switchover:
roles/autonomousDatabaseAdmin
Perform a Switchover
To switchover to a peer database, do the following:
Console
Go to the Autonomous Database page.
Click the name of the primary Autonomous Database on which you want to perform a switchover operation.
On the Autonomous Database details page, click the Disaster Recovery tab.
In the Peer database section, for the peer database that you want to switchover to, click
View actions, and then click Switchover.In the Confirm switchover to peer dialog, enter the peer database name and click Confirm.
On the Disaster recovery tab, in the Peer database section, the Status field shows you the progress of the switchover operation. After the switchover is complete, the peer database becomes the "Primary" and its Status field shows "Available". Whereas, the former Primary Autonomous Database becomes the "Standby".
If you initiated the switchover in the OCI console, you can still see the progress of the switchover in the Google Cloud console.
gcloud
Use the gcloud oracle-database autonomous-databases switchover
command to perform a switchover.
gcloud oracle-database autonomous-databases switchover DATABASE_ID
--project=PROJECT_ID
--location=REGION
--peer-autonomous-database=projects/PROJECT_ID/locations/REGION/autonomousDatabases/PEER_DATABASE_ID
Replace the following:
- DATABASE_ID: the ID of your database.
- PROJECT_ID: the ID of your Google Cloud project.
- REGION: the region of your peer database.
- PEER_DATABASE_ID: the ID of your peer database.