This post explains the Enhancements for Cascaded Standby Databases in Oracle 12c. There are new Possibilities for cascading Standby Databases in Oracle 12c. The main Differents between Oracle 12c and the previous Releases are:
- Real-Time Cascading
- Far Sync Standby Database
- Data Guard Broker now supports cascaded Standby Database
However, you can still only cascade a Standby Database from a Physical Standby Database. It is not supported to cascade a Standby Database from a Logical Standby Database.
It is now possible to forward Redo in Real-Time Mode from the first to the cascaded Standby Database. So the Redo Record is forwarded to the cascaded Standby Database once written into a Standby RedoLog of the first Standby Database.
Non Real-Time Cascading means that the whole Log Sequence is transferred to the terminal Standby Database(s) after a Log Switch on the Primary Database.
- First (Cascading) Standby must be a Physical or Far Sync Standby Database
- Standby RedoLogs must be in Place and used at least on the Cascading Standby Database
- Active Data Guard Option must be licensed
- Primary, Cascading and Cascaded Standby Database db_unique_name must be present in the dg_config of log_archive_config on all the Databases
First of all, setup a Data Guard Environment as usual to the cascading Standby Database. The Log Transport Method should be ‘SYNC’ and Standby RedoLogs must be configured on the cascading Standby Database. Once you created the cascaded Standby Database you can now setup the cascading Log Transport Services. Here are some Hints for correct Setup:
– Primary, Cascading, and Cascaded Standby Database db_unique_name must be present in the dg_config of log_archive_config on all the Databases.
– Setup log_archive_dest_n on the cascading Standby Database to serve the cascaded (terminal) Standby Databases using the Attribute ‘valid_for=(STANDBY_LOGFILES,STANDBY_ROLE)‘
– You can toggle between Real-Time and Non Real-Time Cascading using the Log Transport Method.
ASYNC = Real-Time Cascading SYNC = Non Real-Time Cascading
– You can only use log_archive_dest_1 until log_archive_dest_10 for Non Real-Time Cascading Destinations where all log_archive_dest_n’s can be used for Real-Time Cascading on the Cascading Standby Database.
– The Cascading Standby Standby can be in any Protection Mode.
– A Cascading Standby Database can serve one or multiple terminal Standby Databases.
– FAL_SERVER on the cascading Standby Database should be set to the Primary or any other Standby Database served by the Primary Database directly.
– FAL_SERVER on the terminal Standby Database should be set to the cascading Standby Database or the Primary Database.
Far Sync Standby Database
A Far Sync Standby Database is a cascading Standby Database that acts as a Redo Log Repository for a Terminal Database. It does not contain any Datafiles. Only Log Transport Services are active on a Far Sync Standby Database. The Advantage of a Far Sync Standby Database is that it can be a local ArchiveLog Repository for the Primary Database acting in Maximum Protection Mode where the Physical or Logical Standby Database can be on a far remote Site.
Data Guard Broker and Cascaded Standby Database
There is a new Data Guard Broker Property called ‘RedoRoutes’ used to build and implement a cascaded Data Guard Broker Configuration. It has the following Format:
RedoRoutes = '([Redo Source] : [Redo Destination])'
Redo Source: This is the Source the Redo is coming from. It can be a db_unique_name or the ‘LOCAL’-Keyword which is an Alias for the local Database Name (Cannot be used for a Far Sync Standby Database).
Redo Destination: This is the Destination where the Redo is shipped to from this Database. It can be one or more (comma separated) db_unique_name’s or the ‘ALL’-Keyword which is an Alias for all possible Destinations inside the Data Guard Broker Configuration. Optional you can also specify the Transport Method to be used to the Destination. This can be:
- SYNC: corresponds to log_archive_dest_n Attributes ‘SYNC AFFIRM’ or Non Real Time Cascade.
- ASYNC: corresponds to log_archive_dest_n Attribute ‘ASYNC’ or Real Time Cascade.
- FASTSYNC: corresponds to log_archive_dest_n Attributes ‘SYNC NOAFFIRM’.
For the purposes of this post, the following environment is used as an example to describe the procedure:
Primary Database: prim Cascading Standby Database: local_stdby Cascaded (terminal) Standby Database: remote_stdby
We want to serve the local Standby Database with ‘SYNC NOAFFIRM’ and the remote Standby Database in Real-Time Cascade Mode. So the setting would be:
Primary Database (prim):
RedoRoutes = '(LOCAL : local_stdby FASTSYNC)'
So the Primary Database only ships Redo to the local Standby Database but has Archive Destination to the remote Standby Database.
Local Standby Database (local_stdby):
RedoRoutes = '(prim : remote_stdby ASYNC)'
Here we configure that the Redo coming from ‘prim’ is forwarded in Real-Time Cascade (ASYNC) to the remote Standby Database.