Previously on article https://mypieceofdata.com/2025/07/21/configuring-replication-on-zero-data-loss-recovery-appliance/, we learned how to configure ZDLRA replication in a one-way setup, from an upstream to a downstream, creating a high-availability environment.
In this article, we will use the same configuration previously implemented and add only a few additional settings so that the downstream RAHA2 also becomes an upstream, sending backups to RAHA1, which will now also act as a downstream.
We will use one additional VPC user, repuser_from_raha2, which will be responsible for replicating backups between the Recovery Appliances. We will refer to the Recovery Appliances as RAHA1 and RAHA2.
- repuser_from_raha2
- RAHA1
- RAHA2
If it does not already exist on RAHA1, create the VPC user that will be used by the replication server to send backups from the RAHA2 Recovery Appliance to the RAHADR1 Recovery Appliance.
$ racli add vpc_user –user_name repuser_from_raha2
repuser_from_raha2 New Password: repuser_from_raha2_password
Sun Mar 25 08:35:01 2018: Start: Add vpc user repuser_from_raha2.
Sun Mar 25 08:35:01 2018: Add vpc user repuser_from_raha2 successfully.
Sun Mar 25 08:35:01 2018: End: Add vpc user repuser_from_raha2.
Configure the replication server that will be used to replicate database backups from RAHA2 to RAHA1.
If the replication server has not yet been created, create the replication server between RAHA2 and RAHA1. The steps below use the same operation and naming conventions as the equivalent steps previously performed using Enterprise Manager when no dedicated replication network is available.
Create the auto-login wallet. If the replication wallet does not exist on RAHA2, create the replication wallet pointing to RAHA1.
$ mkstore -wrl file:/dbfs_repdbfs/REPLICATION -createALO
Add credentials to the wallet. On RAHA2, add the credentials required to log in to RAHA1.
You need to change all datas such as domain, PORT, database names and reserved sizes that I am going to show you below with information that corresponds to your environment.
$ mkstore -wrl file:/dbfs_repdbfs/REPLICATION -createCredential ra1repl-scan.<domain>:<PORT>/raha1 repuser_from_raha2 repuser_from_raha2_password
Create the ZDLRA replication server. On RAHA2, create the ZDLRA replication server:
$ sqlplus rasys/<RASYS_PASSWORD>
SQL> exec dbms_ra.create_replication_server( replication_server_name => 'RAHA1_REP', sbt_so_name=> 'libra.so', max_streams => 8, catalog_user_name => 'RASYS', wallet_alias => 'ra1repl-scan.<domain>:<PORT>/raha1', wallet_path => 'file:/dbfs_repdbfs/REPLICATION');
PL/SQL procedure successfully completed.
Configure upstream and downstream Recovery Appliances.
Create the protection policy for the protected database on the downstream Recovery Appliance and add the database.
On RAHA1, create a replication policy that will be used for the CDB122HA database (if one does not already exist). A unique protection policy name is not required; however, the protection policy must not be associated with any replication server configured between RAHA1 and RAHA2 (if one exists).
Note: Because the RAHA1 Recovery Appliance will not normally be receiving redo from the CDB122HA database, the unprotected data window parameter is set to 1.25 days to avoid false alerts when the CDB122HA database is inactive.
$ sqlplus rasys/<RASYS_PASSWORD>
SQL> exec dbms_ra.create_protection_policy( protection_policy_name => 'cdb122ha_PP', storage_location_name => 'DELTA', recovery_window_goal => numtodsinterval(3,'DAY') , unprotected_window => numtodsinterval(1.25,'DAY'), allow_backup_deletion => 'NO', store_and_forward => 'YES');
PL/SQL procedure successfully completed.
SQL> exec dbms_ra.add_db(db_unique_name => 'cdb122ha', protection_policy_name => 'cdb122ha_PP', reserved_space => '1T');
PL/SQL procedure successfully completed.
SQL> exec dbms_ra.grant_db_access(username => ‘repuser_from_raha2‘, db_unique_name => ‘cdb122ha’);
PL/SQL procedure successfully completed.
Create the protection policy for the protected databases on the upstream Recovery Appliance and add the database.
On RAHA1, create the protection policy that will be used by the CDB122HA database (if one does not already exist). A unique protection policy name is not required; however, the protection policy will be associated with the replication server configured between RAHA1 and RAHA2, so all databases included in the protection policy will be replicated.
$ sqlplus rasys/<RASYS_PASSWORD>
SQL> exec dbms_ra.create_protection_policy( protection_policy_name => 'cdb122ha_PP' , storage_location_name => 'DELTA' , recovery_window_goal => numtodsinterval(3,'DAY') , unprotected_window => numtodsinterval(5,'MINUTE') , allow_backup_deletion => 'NO');
PL/SQL procedure successfully completed.
SQL> exec dbms_ra.add_db(db_unique_name => 'cdb122ha', protection_policy_name => 'cdb122ha_PP', reserved_space => '1T');
PL/SQL procedure successfully completed.
SQL> exec dbms_ra.grant_db_access(username => 'repuser_from_raha2', db_unique_name => 'cdb122ha');
PL/SQL procedure successfully completed.
Add the protection policy to the replication server configured on the upstream Recovery Appliance.
On RAHA2, add the protection policy for the CDB122HA database.
$ sqlplus rasys/<RASYS_PASSWORD>
SQL> exec dbms_ra.add_replication_server( replication_server_name => 'RAHA1_REP', protection_policy_name => 'cdb122ha_PP');
PL/SQL procedure successfully completed.