Set Up the Future Secondary Database
After you establish the first physical standby in Oracle Cloud Infrastructure (OCI), you'll create a second one in another region. This second database is the database in your cloud-based disaster recovery environment.
Oracle Data Guard
cascade standby functionality, where the second standby receives its
redo
from the first standby, not directly from the
on-premises primary, reduces network traffic from the on-premises host site.
It will also establish what will ultimately be the main
redo
propagation route.
At this time, there are constraints preventing us from using OCI tooling to establish and fully manage our future disaster recovery database.Oracle Data Guard Association cloud service cannot currently register an existing standby database relationship and won't be able to manage the standby database configuration. Therefore, for example, Oracle Managed Disaster Recovery Cloud Service cannot be used.
Since both standby databases are established with an OCI-based placeholder database, the OCI control plane can manage patching and other lifecycle activity for each of them.
Create Placeholder Database
Use the OCI Console to create a new placeholder database in a different region (recommended) or in a different availability domain in the same region.
dbaascli
.
Prepare for Database Restore
Configure the new Oracle home in preparation for the restore of the database.
- Adjust the
tnsnames.ora
file on each environment to be aware of each of the other databases. Verify communications between environments. - Copy the password file from the first standby database.
- Copy the Transparent Data Encryption (TDE) wallet from the first standby database.
- Adjust the database parameters for the cascade standby database.
Configure TNS for Cascade Standby
Adjust the tnsnames.ora
file on each environment to be
aware of each of the other databases. Verify communications between
environments.
- Add the TNS connect string for the cascade standby database to the
tnsnames.ora
files used by all Oracle Real Application Clusters (Oracle RAC) instances of the on-premises primary and the first standby databases - Add the TNS connect strings for the on-premises primary and the
first OCI standby databases to the
tnsnames.ora
files used by all Oracle RAC instances of the cascade standby database.
SCAN IP
addresses, not the
SCAN
name. The following is an example of a compliant TNS entry
that Oracle Zero Downtime Migration created for our first standby database:
CDBHCM_iad1dx =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = <SCAN IPv4 address 1>) (PORT = 1521))
(ADDRESS = (PROTOCOL = TCP) (HOST = <SCAN IPv4 address 2>) (PORT = 1521))
(ADDRESS = (PROTOCOL = TCP) (HOST = <SCAN IPv4 address 3>)) (PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = CDBHCM_iad1dx)
(FAILOVER_MODE =
(TYPE = select)
(METHOD = basic)
)
(UR=A)
)
)
You must log into each database server as the oracle OS user, source
your environment, then change the directory to
$TNS_ADMIN
.
Copy the TDE Wallet
This creates a new tde
subdirectory with the wallet files from
the first physical standby database.
Restore the Database to the Cascade Standby
Restore the database
onto the cascade standby footprint from the first physical standby database. Use the Oracle Recovery Manager (RMAN) command RESTORE FROM SERVICE
to restore the control file
and data files.
Configure Data Guard Broker for the Cascade Standby
You already configured Data Guard Broker between the on-premises primary and the first OCI standby database by Oracle Zero Downtime Migration, now you'll add the cascade standby to the configuration.
The cascade standby and the on-premises databases do not communicate directly with
each other. When necessary, their redo
is shipped through the first
on-premises standby database:
- When the on-premises database is primary,
redo
is sent from the on-premises primary to or through the first standby, then to the cascade standby:- On-premises primary to the OCI first standby
- OCI first standby to the OCI cascade standby
- When the first standby is in the primary role,
redo
is sent from that database directly to both the on-premises and the cascade standby databases:- OCI primary to the on-premises standby
- OCI primary to the OCI cascade standby
- If the cascade standby becomes primary in this configuration, redo will be sent
from that database to or through the OCI first standby, then to the on-premises
database:
- OCI first standby to the on-premises standby
- OCI cascade primary to the OCI first standby