- NAME
-
- gcloud oracle-database autonomous-databases switchover - switchovers an AutonomousDatabase to a new primary
- SYNOPSIS
-
-
gcloud oracle-database autonomous-databases switchoverAUTONOMOUS_DATABASE[--async] [--location=LOCATION] [--peer-autonomous-database=PEER_AUTONOMOUS_DATABASE] [GCLOUD_WIDE_FLAG …]
-
- DESCRIPTION
- Switchovers an AutonomousDatabase from a standby database to a new primary.
- EXAMPLES
- To switchover an AutonomousDatabase with id
my-instancein the locationus-east4with primary database name as 'projects/project-id/locations/us-west3/autonomousDatabases/my-instance' run:gcloud oracle-database autonomous-databases switchover my-instance --location = us-east4 --peer-autonomous-database = projects/project-id/locations/us-west3/autonomousDatabases/my-instanceTo switchover an AutonomousDatabase with id
my-instancein the locationus-east4to a local standby database, run:gcloud oracle-database autonomous-databases switchover my-instance --location = us-east4 - POSITIONAL ARGUMENTS
-
- AutonomousDatabase resource - The name of the Autonomous Database in the
following format:
projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}.
This represents a Cloud resource. (NOTE) Some attributes are not given arguments
in this group but can be set in other ways.
To set the
projectattribute:- provide the argument
autonomous_databaseon the command line with a fully specified name; - provide the argument
--projecton the command line; - set the property
core/project.
To set the
locationattribute:- provide the argument
autonomous_databaseon the command line with a fully specified name; - provide the argument
--locationon the command line.
This must be specified.
-
AUTONOMOUS_DATABASE - ID of the autonomousDatabase or fully qualified identifier for the
autonomousDatabase.
To set the
autonomous_databaseattribute:- provide the argument
autonomous_databaseon the command line.
- provide the argument
- provide the argument
- AutonomousDatabase resource - The name of the Autonomous Database in the
following format:
projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}.
This represents a Cloud resource. (NOTE) Some attributes are not given arguments
in this group but can be set in other ways.
- FLAGS
-
-
--async - Return immediately, without waiting for the operation in progress to complete.
-
--location=LOCATION - For resources [autonomous_database, peer-autonomous-database], provides fallback value for resource location attribute. When the resource's full URI path is not provided, location will fallback to this flag value.
- AutonomousDatabase resource - The peer database name to switch over to. Required
for cross-region standby, and must be omitted for in-region Data Guard. This
represents a Cloud resource. (NOTE) Some attributes are not given arguments in
this group but can be set in other ways.
To set the
projectattribute:- provide the argument
--peer-autonomous-databaseon the command line with a fully specified name; - provide the argument
--projecton the command line; - set the property
core/project.
To set the
locationattribute:- provide the argument
--peer-autonomous-databaseon the command line with a fully specified name; - provide the argument
--locationon the command line.
- provide the argument
-
--peer-autonomous-database=PEER_AUTONOMOUS_DATABASE - ID of the autonomousDatabase or fully qualified identifier for the
autonomousDatabase.
To set the
autonomous-databaseattribute:- provide the argument
--peer-autonomous-databaseon the command line.
- provide the argument
-
- GCLOUD WIDE FLAGS
- These flags are available to all commands:
--access-token-file,--account,--billing-project,--configuration,--flags-file,--flatten,--format,--help,--impersonate-service-account,--log-http,--project,--quiet,--trace-token,--user-output-enabled,--verbosity.Run
$ gcloud helpfor details. - API REFERENCE
- This command uses the
oracledatabase/v1API. The full documentation for this API can be found at: https://cloud.google.com/oracle/database/docs
gcloud oracle-database autonomous-databases switchover
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-05-27 UTC.

