Stay organized with collectionsSave and categorize content based on your preferences.
This page describes how to create a peer database for your Autonomous Database
in Google Cloud.
Once you create an Autonomous Database, you can set up one or more peer
databases for it as a part of your disaster recovery plan.
You can only create peer databases with Autonomous Data Guard. For APEX and JSON
workloads, you can't create a peer database with Autonomous Data Guard.
Before you begin
In the OCI console, ensure that you are subscribed to the region in which you
want to create the peer database.
Ensure that you have the following Identity and Access Management (IAM) roles and
permissions required to create a peer database:
Click the name of the Autonomous Database for which you want to create a peer
database.
On theAutonomous Database detailspage, click theDisaster Recoverytab.
In thePeer databasesection, clickCreate.
On theAdd peer databasepage, do the following:
Select a region. The regions in which you already have peer databases
don't appear in the list.
If you already have peer databases in all regions and no additional
region appears in the list, then you can't create any more peer
databases.
(Optional) Select theEnable cross-region backup replication to disaster recovery peercheckbox. This option enables backup replication to your peer database
for up to seven days or for the selected backup retention period
(if less than seven days).
From theNetwork projectlist, select the project that contains
your ODB Network.
Select theODB Network.
Select aClient subnet.
In theAdvanced settingssection, you can optionally modify the
following settings:
Private IP address
Hostname prefix
ClickSave.
On theDisaster recoverytab, in thePeer databasesection, theStatusfield shows you the progress of the create operation. The
peer database is ready to use when theStatusfield shows
"Standby".
gcloud
Use thegcloud oracle-database autonomous-databases createcommand to create a peer database.
PEER_DATABASE_ID: a unique identifier for your peer database.
PROJECT_ID: the ID of your Google Cloud project.
REGION: the region in which you want to create your
peer database.
Forodb-subnetproperty, replace the following:
ODB_NETWORK_PROJECT_ID: the ID of your Google Cloud
project which contains your ODB Network. If you're using a
Shared VPC, then this is the ID of your host project.
REGION: the region of your ODB Network.
ODB_NETWORK_ID: the ID of your ODB Network.
ODB_SUBNET_ID: the ID of your ODB Subnet.
ENABLE_BACKUP_REPLICATION: (Optional) enables backup replication
to your peer database for up to seven days or for the selected backup
retention period (if less than seven days). The default value isfalse.
Forsource-config-autonomous-databaseparameter, replace the following:
PROJECT_ID: the ID of your Google Cloud project which
contains your primary database.
REGION: the region of the primary database.
PRIMARY_DATABASE_ID: the ID of the primary database.
API
To create a peer database, run the followingcurlcommand:
PROJECT_ID: the ID of your Google Cloud project in which
to create the peer database.
REGION: the region in which to create the peer database.
PEER_DATABASE_ID: a unique identifier for your peer database.
Fornameparameter, replace the following:
PROJECT_ID: the ID of your Google Cloud project which
contains your primary database.
REGION: the region of the primary database.
PRIMARY_DATABASE_ID: the ID of the primary database.
ForodbSubnetproperty, replace the following:
ODB_NETWORK_PROJECT_ID: the ID of your Google Cloud project
which contains your ODB Network. If you're using a Shared VPC,
then this is the ID of your host project.
REGION: the region of your ODB Network.
ODB_NETWORK_ID: the ID of your ODB Network.
ODB_SUBNET_ID: the ID of your ODB Subnet.
Forsource_configparameter, replace the following:
PROJECT_ID: the ID of your Google Cloud project which
contains your primary database.
REGION: the region of the primary database.
PRIMARY_DATABASE_ID: the ID of the primary database.
ENABLE_BACKUP_REPLICATION: enables backup replication to your
peer database for up to seven days or for the selected backup retention
period (if less than seven days). The default value isfalse.
When completed, you can view the new peer Autonomous Database in theAutonomous Databaseslist along with its details. Also, after creating a
peer database in Google Cloud, you can manage and modify its network
settings in the OCI console.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Create a peer database\n\nThis page describes how to create a peer database for your Autonomous Database\nin Google Cloud.\n\nOnce you create an Autonomous Database, you can set up one or more peer\ndatabases for it as a part of your disaster recovery plan.\n\nYou can only create peer databases with Autonomous Data Guard. For APEX and JSON\nworkloads, you can't create a peer database with Autonomous Data Guard.\n\nBefore you begin\n----------------\n\n- In the OCI console, ensure that you are subscribed to the region in which you want to create the peer database.\n- Ensure that you have the following Identity and Access Management (IAM) roles and\n permissions required to create a peer database:\n\n - `roles/autonomousDatabaseAdmin`\n- [Create an ODB Network](/oracle/database/docs/create-odb-network).\n\nCreate a peer database\n----------------------\n\nTo create a peer database, do the following:\n**Note:** To create a peer database with an ODB Network, use gcloud CLI or API. \n\n### Console\n\n1. Go to the **Autonomous Database** page.\n\n [Go to Autonomous Database](https://console.cloud.google.com/oracle/autonomous-databases/)\n2. Click the name of the Autonomous Database for which you want to create a peer\n database.\n\n3. On the **Autonomous Database details** page, click the\n **Disaster Recovery** tab.\n\n4. In the **Peer database** section, click **Create**.\n\n5. On the **Add peer database** page, do the following:\n\n 1. Select a region. The regions in which you already have peer databases\n don't appear in the list.\n\n If you already have peer databases in all regions and no additional\n region appears in the list, then you can't create any more peer\n databases.\n 2. (Optional) Select the\n **Enable cross-region backup replication to disaster recovery peer**\n checkbox. This option enables backup replication to your peer database\n for up to seven days or for the selected backup retention period\n (if less than seven days).\n\n | **Note:** Replicated backups incur additional storage costs.\n 3. From the **Network project** list, select the project that contains\n your ODB Network.\n\n 4. Select the **ODB Network**.\n\n 5. Select a **Client subnet**.\n\n 6. In the **Advanced settings** section, you can optionally modify the\n following settings:\n\n - Private IP address\n - Hostname prefix\n 7. Click **Save**.\n\n On the **Disaster recovery** tab, in the **Peer database** section, the\n **Status** field shows you the progress of the create operation. The\n peer database is ready to use when the **Status** field shows\n \"Standby\".\n\n### gcloud\n\nUse the `gcloud oracle-database autonomous-databases create`\ncommand to create a peer database. \n\n gcloud oracle-database autonomous-databases create \u003cvar translate=\"no\"\u003ePEER_DATABASE_ID\u003c/var\u003e \\\n --project=\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e \\\n --location=\u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e \\\n --odb-subnet=projects/\u003cvar translate=\"no\"\u003eODB_NETWORK_PROJECT_ID\u003c/var\u003e/locations/\u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e/odbNetworks/\u003cvar translate=\"no\"\u003eODB_NETWORK_ID\u003c/var\u003e/odbSubnets/\u003cvar translate=\"no\"\u003eODB_SUBNET_ID\u003c/var\u003e \\\n --source-config-automatic-backups-replication-enabled=\u003cvar translate=\"no\"\u003eENABLE_BACKUP_REPLICATION\u003c/var\u003e \\\n --source-config-autonomous-database=projects/\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e/locations/\u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e/autonomousDatabases/\u003cvar translate=\"no\"\u003ePRIMARY_DATABASE_ID\u003c/var\u003e\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003ePEER_DATABASE_ID\u003c/var\u003e: a unique identifier for your peer database.\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the ID of your Google Cloud project.\n- \u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e: the region in which you want to create your peer database.\n- For `odb-subnet` property, replace the following:\n - \u003cvar translate=\"no\"\u003eODB_NETWORK_PROJECT_ID\u003c/var\u003e: the ID of your Google Cloud project which contains your ODB Network. If you're using a Shared VPC, then this is the ID of your host project.\n - \u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e: the region of your ODB Network.\n - \u003cvar translate=\"no\"\u003eODB_NETWORK_ID\u003c/var\u003e: the ID of your ODB Network.\n - \u003cvar translate=\"no\"\u003eODB_SUBNET_ID\u003c/var\u003e: the ID of your ODB Subnet.\n- \u003cvar translate=\"no\"\u003eENABLE_BACKUP_REPLICATION\u003c/var\u003e: (Optional) enables backup replication to your peer database for up to seven days or for the selected backup retention period (if less than seven days). The default value is `false`.\n- For `source-config-autonomous-database` parameter, replace the following:\n - \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the ID of your Google Cloud project which contains your primary database.\n - \u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e: the region of the primary database.\n - \u003cvar translate=\"no\"\u003ePRIMARY_DATABASE_ID\u003c/var\u003e: the ID of the primary database.\n\n### API\n\nTo create a peer database, run the following `curl` command: \n\n```\ncurl -X POST \\\n-H \"Authorization: Bearer $(gcloud auth print-access-token)\" \\\n-H \"Content-Type: application/json\" \\\n\"https://oracledatabase.googleapis.com/v1/projects/PROJECT_ID/locations/REGION/autonomousDatabases/PEER_DATABASE_ID\"\n-d \\\n'{\n \"name\": \"projects/PROJECT_ID/locations/REGION/autonomousDatabases/PRIMARY_DATABASE_ID\",\n \"odb_subnet\": \"projects/ODB_NETWORK_PROJECT_ID/locations/REGION/odbNetworks/ODB_NETWORK_ID/odbSubnets/ODB_SUBNET_ID\",\n \"source_config\": {\n \"autonomous_database\": \"projects/PROJECT_ID/locations/REGION/autonomousDatabases/PRIMARY_DATABASE_ID\",\n \"automatic_backups_replication_enabled\": ENABLE_BACKUP_REPLICATION\n }\n}'\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the ID of your Google Cloud project in which to create the peer database.\n- \u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e: the region in which to create the peer database.\n- \u003cvar translate=\"no\"\u003ePEER_DATABASE_ID\u003c/var\u003e: a unique identifier for your peer database.\n- For `name` parameter, replace the following:\n - \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the ID of your Google Cloud project which contains your primary database.\n - \u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e: the region of the primary database.\n - \u003cvar translate=\"no\"\u003ePRIMARY_DATABASE_ID\u003c/var\u003e: the ID of the primary database.\n- For `odbSubnet` property, replace the following:\n - \u003cvar translate=\"no\"\u003eODB_NETWORK_PROJECT_ID\u003c/var\u003e: the ID of your Google Cloud project which contains your ODB Network. If you're using a Shared VPC, then this is the ID of your host project.\n - \u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e: the region of your ODB Network.\n - \u003cvar translate=\"no\"\u003eODB_NETWORK_ID\u003c/var\u003e: the ID of your ODB Network.\n - \u003cvar translate=\"no\"\u003eODB_SUBNET_ID\u003c/var\u003e: the ID of your ODB Subnet.\n- For `source_config` parameter, replace the following:\n - \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the ID of your Google Cloud project which contains your primary database.\n - \u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e: the region of the primary database.\n - \u003cvar translate=\"no\"\u003ePRIMARY_DATABASE_ID\u003c/var\u003e: the ID of the primary database.\n- \u003cvar translate=\"no\"\u003eENABLE_BACKUP_REPLICATION\u003c/var\u003e: enables backup replication to your peer database for up to seven days or for the selected backup retention period (if less than seven days). The default value is `false`.\n\nWhen completed, you can view the new peer Autonomous Database in the\n**Autonomous Databases** list along with its details. Also, after creating a\npeer database in Google Cloud, you can manage and modify its network\nsettings in the OCI console.\n\nWhat's next\n-----------\n\n- [View peer database details](/oracle/database/docs/view-peer-databases).\n- Learn how to [switchover](/oracle/database/docs/perform-switchover) to a a peer database.\n- [Delete a peer database](/oracle/database/docs/delete-peer-database)."]]