gcloud oracle-database autonomous-databases switchover

NAME
gcloud oracle-database autonomous-databases switchover - switchovers an AutonomousDatabase to a new primary
SYNOPSIS
gcloud oracle-database autonomous-databases switchoverAUTONOMOUS_DATABASE--peer-autonomous-database=PEER_AUTONOMOUS_DATABASE[--async][--location=LOCATION][GCLOUD_WIDE_FLAG]
DESCRIPTION
Switchovers an AutonomousDatabase from a standby database to a new primary.
EXAMPLES
To switchover an AutonomousDatabase with idmy-instance in thelocationus-east4 with primary database name as'projects/project-id/locations/us-west3/autonomousDatabases/my-instance' run:
gcloudoracle-databaseautonomous-databasesswitchovermy-instance--location=us-east4--peer-autonomous-database=projects/project-id/locations/us-west3/autonomousDatabases/my-instance
POSITIONAL ARGUMENTS
AutonomousDatabase resource - The name of the Autonomous Database in thefollowing format:projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}.This represents a Cloud resource. (NOTE) Some attributes are not given argumentsin this group but can be set in other ways.

To set theproject attribute:

  • provide the argumentautonomous_database on the command line with afully specified name;
  • provide the argument--project on the command line;
  • set the propertycore/project.

To set thelocation attribute:

  • provide the argumentautonomous_database on the command line with afully specified name;
  • provide the argument--location on the command line.

This must be specified.

AUTONOMOUS_DATABASE
ID of the autonomousDatabase or fully qualified identifier for theautonomousDatabase.

To set theautonomous_database attribute:

  • provide the argumentautonomous_database on the command line.
REQUIRED FLAGS
AutonomousDatabase resource - The peer database name to switch over to. Thisrepresents a Cloud resource. (NOTE) Some attributes are not given arguments inthis group but can be set in other ways.

To set theproject attribute:

  • provide the argument--peer-autonomous-database on the command linewith a fully specified name;
  • provide the argument--project on the command line;
  • set the propertycore/project.

To set thelocation attribute:

  • provide the argument--peer-autonomous-database on the command linewith a fully specified name;
  • provide the argument--location on the command line.

This must be specified.

--peer-autonomous-database=PEER_AUTONOMOUS_DATABASE
ID of the autonomousDatabase or fully qualified identifier for theautonomousDatabase.

To set theautonomous-database attribute:

  • provide the argument--peer-autonomous-database on the commandline.
OPTIONAL FLAGS
--async
Return immediately, without waiting for the operation in progress to complete.
--location=LOCATION
For resources [autonomous_database, peer-autonomous-database], provides fallbackvalue for resource location attribute. When the resource's full URI path is notprovided, location will fallback to this flag value.
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 help for details.

API REFERENCE
This command uses theoracledatabase/v1 API. The full documentationfor this API can be found at:https://cloud.google.com/oracle/database/docs

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-07-15 UTC.