# Deploy Oracle Data Guard on Bare Metal Solution

[Oracle® Data Guard](https://www.oracle.com/database/technologies/high-availability/dataguard.html)
is a high availability and disaster recovery solution for Oracle databases.
Setting it up on Bare Metal Solution follows the same [best practices](https://www.oracle.com/database/technologies/active-data-guard-12c-best-practice.html)
as on-premises or any other Oracle Data Guard deployment.

> [!NOTE]
> **Note:** Customers are responsible for procuring licenses for the Oracle workloads they choose to run on Bare Metal Solution, and customers are responsible for complying with those licenses. Google does not provide licenses for Oracle workloads.

## Before you begin

This guide explains the process of configuring Oracle Data Guard on Bare Metal Solution.
It applies to Bare Metal Solution environments running Oracle database version 12.2 or
newer that meet the following criteria:

- Each environment contains two [Bare Metal Solution clusters](https://docs.cloud.google.com/bare-metal/docs/bms-setup) that are configured in separate regional extensions.
- Each Bare Metal Solution cluster communicates through a Google [Virtual Private Cloud (VPC)](https://cloud.google.com/vpc) via a [Partner Cloud Interconnect](https://cloud.google.com/network-connectivity/docs/interconnect).
- [Oracle Grid Infrastructure and Oracle database](https://docs.oracle.com/en/database/oracle/oracle-database/19/sbydb/oracle-data-guard-concepts.html#GUID-F78703FB-BD74-4F20-9971-8B37ACC40A65) are already installed on the Bare Metal Solution servers.
- The primary and standby databases for Data Guard are hosted in separate Bare Metal Solution regional extensions.
- Each Bare Metal Solution cluster uses Oracle Real Application Clusters (RAC) option for high availability.
- Each Bare Metal Solution cluster uses Oracle Automatic Storage Management (ASM) for shared storage.
- Oracle ASM diskgroup names are consistent between clusters.
- TCP port 1521 is used for communication between the primary and standby databases.

The first Bare Metal Solution cluster hosts the Data Guard primary database and the
second Bare Metal Solution cluster hosts the standby database. This guide uses the Data
Guard broker to manage the configuration. This guide also includes instructions
to optionally configure the Data Guard observer on Compute Engine. Configuring an
observer lets you configure automatic database failover between the primary and
standby databases.

> [!IMPORTANT]
> **Important:** You are responsible for the disaster recovery service level objectives for your application.

## System architecture

The following diagram shows the system architecture used in this guide:

![A system architecture diagram](https://docs.cloud.google.com/static/bare-metal/docs/solutions/oracle/images/dataguard_deployment_architecture.svg)

Each regional extension contains a different Bare Metal Solution cluster. The primary
database, <var translate="no">DBDG_SITE1</var>, exists in regional extension 1. The
standby database, <var translate="no">DBDG_SITE2</var>, exists in regional
extension 2 and is created via active duplication. Communication between the
databases travels over the Partner Cloud Interconnect through a shared
customer Virtual Private Cloud.

## Next steps

Next, [prepare Data Guard's primary database](https://docs.cloud.google.com/bare-metal/docs/solutions/oracle/data-guard-setup/db-setup-primary).