Real-Time Redo Transport

Real-Time Redo Transport for protected databases can be configured to regularly use the upstream Recovery Appliance, but to failover to the downstream Recovery Appliance when the upstream one isn't available. When the upstream Recovery Appliance becomes available again, redo transport automatically changes from using the downstream back to using the upstream.

Configuring the VPC User for Real-Time Redo Transport

This task establishes the VPC user for redo transport and then you choose between (1) enabling parameters in Data Guard Broker and (2) enabling log archive parameters.

  1. Configure the redo_transport_user to the local VPC user.
    $ sqlplus / as sysdba
    
    SQL> alter system set redo_transport_user=hadr_local_vpcuser;
    
    System altered.
  2. Choose one of the two options.

Option 1: Use Data Guard Broker to Configure Real-Time Redo Transport

This task enables Data Guard Broker parameters that establish failover of real-time redo transport from the upstream to the downstream Recovery Appliance.

  1. Enable the dg_broker* parameters from a SQLPLUS session as sysdba.
    $ sqlplus / as sysdba
    
    SQL> alter system set
    dg_broker_config_file1='+DATAC1/cdb122dr/dr1cdb122dr.dat';
    System altered.
    
    SQL> alter system set
    dg_broker_config_file2='+DATAC1/cdb122dr/dr2cdb122dr.dat';
    System altered.
    
    SQL> alter system set dg_broker_start=true;
    System altered.
  2. Configure Data Guard Broker with respect to the primary databases, connection identifiers for the Recovery Appliances, network timeouts, and maximum number of failures. In the end, enable the configuration changes.
    $ dgmgrl sys/myPassword
    
    DGMGRL for Linux: Release 12.2.0.1.0 - Production on Tue Jun 5 11:37:44 2018
    
    Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved.
    
    Welcome to DGMGRL, type "help" for information.
    Connected to "cdb122dr"
    Connected as SYSDG.
    
    DGMGRL> create configuration cdb122dr as primary database is cdb122dr connect
    identifier is '//scam06-scan3/cdb122dr';
    Configuration "cdb122dr" created with primary database "cdb122dr"
    
    DGMGRL> add recovery_appliance rahadr1 as connect identifier is 'dr_rahadr1';
    Recovery Appliance "rahadr1" added
    
    DGMGRL> add recovery_appliance rahadr2 as connect identifier is 'dr_rahadr2';
    Recovery Appliance "rahadr2" added
    
    DGMGRL> edit recovery_appliance rahadr1 set property MaxFailure=1;
    Property "maxfailure" updated
    
    DGMGRL> edit recovery_appliance rahadr1 set property ReopenSecs=10;
    Property "reopensecs" updated
    
    DGMGRL> edit recovery_appliance rahadr1 set property NetTimeout=8;
    Property "nettimeout" updated
    
    DGMGRL> edit recovery_appliance rahadr2 set property MaxFailure=1;
    Property "maxfailure" updated
    
    DGMGRL> edit recovery_appliance rahadr2 set property NetTimeout=8;
    Property "nettimeout" updated
    
    DGMGRL> edit database cdb122dr set property RedoRoutes = '(LOCAL : (rahadr1
    async priority=1, rahadr2 async priority=2))';
    Warning: ORA-16677: Standby database has the same or higher priority than
    other members specified in the RedoRoutes group.
    Property "redoroutes" updated
    
    DGMGRL> enable configuration;
    Enabled.

Note:

If Redo Transport does not start, then you may need to bounce the protected database. For a RAC database, this can be done in a rolling fashion.

Option 2: Use log_archive* Parameters to Configure Real-Time Redo Transport

This task enables manually changes several log_archive* parameters that establish failover of real-time redo transport from the upstream to the downstream Recovery Appliance.

  • Log into sqlplus as rasys/ra and change several parameters with respect to the primary databases, connection identifiers for the Recovery Appliances, network timeouts, and maximum number of failures. In the end, enable the configuration changes.
    $ sqlplus rasys/ra
    
    SQL> alter system set log_archive_config =
    'dg_config=(cdb122dr,rahadr1,rahadr2)';
    
    SQL> alter system set log_archive_dest_2='service=dr_rahadr1 ASYNC NOAFFIRM
    delay=0 optional compression=disable max_failure=1 max_connections=1
    reopen=10 db_unique_name=rahadr1 net_timeout=8 group=1 priority=1
    valid_for=(online_logfile,all_roles)';
    
    SQL> alter system set log_archive_dest_3='service=dr_rahadr2 ASYNC NOAFFIRM
    delay=0 optional compression=disable max_failure=1 max_connections=1
    reopen=300 db_unique_name=rahadr2 net_timeout=8 group=1 priority=2
    valid_for=(online_logfile,all_roles)';
    
    SQL> alter system set log_archive_dest_state_2=enable;
    
    SQL> alter system set log_archive_dest_state_3=enable;

Note:

If Redo Transport does not start, then you may need to bounce the protected database. For a RAC database, this can be done in a rolling fashion.