Configuring Replication for Backup and Redo Failover
After you configure the primary and the alternate Recovery Appliances, you perform tasks similar to setting up replication from the alternate to the primary appliance. In this scenario, the alternate appliance has the upstream role and the primary appliance has the downstream role.
Task 1: Configure an Oracle wallet on the alternate Recovery Appliance
On the alternate Recovery Appliance, use the mkstore
utility to create an Oracle auto-login wallet and add the credentials for the replication user you created in "Task 1: Create a VPC user account and a replication user account on the primary Recovery Appliance". The alternate Recovery Appliance requires these credentials when it logs in to the primary Recovery Appliance.
To configure an auto-login wallet on the alternate Recovery Appliance:
-
Run the following command to create an Oracle wallet in the
/dbfs_repdbfs/REPLICATION
directory:mkstore -wrl /dbfs_repdbfs/REPLICATION -createALO
The
mkstore
utility creates a file namedcwallet.sso
in the designated location. -
Run the following command to add the replication user credentials:
mkstore -wrl wallet_location -createCredential serv_name rep_user pwd
The placeholders are defined as follows:
-
wallet_location
is the directory in which you created the wallet in the previous step. -
serv_name
is the Oracle network service name that you use in an EZ Connect descriptor to identify the primary Recovery Appliance on the Oracle network. -
rep_user
is the user name of the replication user account. This user was created in Task 1: Create a VPC user account and a replication user account on the primary Recovery Appliance . The replication user is not created on the alternate. -
pwd
is the secure password of the replication userrep_user
.
For example, the following command adds credentials for the net service name
rapribrf-scan.acme.com
using port1522
and a database name ofrapri
, and the replication user namerepuser_from_alternate
:mkstore -wrl /dbfs_repdbfs/REPLICATION -createCredential \ "rapribrf-scan.acme.com:1522/rapri" "repuser_from_alternate" "pwd"
-
-
Verify that the credentials were properly added for this user by running the following command:
mkstore -wrl /dbfs_repdbfs/REPLICATION -listCredential Oracle Secret Store Tool : Version 12.1.0.1 Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved. List credential (index: connect_string username) 1: rapribrf-scan.acme.com:1522/rapri repuser_from_alternate
The results do not display the password.
Task 2: Create the replication server configuration on the alternate Recovery Appliance
For the primary Recovery Appliance to which this alternate Recovery Appliance will forward backups after an outage, create a replication server configuration by executing DBMS_RA.CREATE_REPLICATION_SERVER
.
This task assumes the following:
-
You want to create a replication server configuration named
raprimary_rep
. -
You want the alternate Recovery Appliance to log in to the primary Recovery Appliance using the replication account
repuser_from_alternate
. You created this account in "Task 1: Create a VPC user account and a replication user account on the primary Recovery Appliance". -
The configuration uses the net service name
rapribrf-scan.acme.com:1522/rapri
that you stored in the Oracle wallet you created in "Task 1: Configure an Oracle wallet on the alternate Recovery Appliance". -
The Oracle wallet is stored in
/dbfs_repdbfs/REPLICATION
. -
The file name of the Recovery Appliance Backup Module, which is preinstalled on every Recovery Appliance, is
/u01/app/oracle/product/12.1.0.2/dbh1/lib/libra.so
. The module functions as an SBT media management library. RMAN references this module when allocating or configuring a channel for backup to the Recovery Appliance (see "Configuring a Protected Database for Recovery Appliance Replication").
To create the replication server configuration:
-
With SQL*Plus or SQL Developer, connect to the alternate Recovery Appliance metadata database as
RASYS
. -
Run the
DBMS_RA.CREATE_REPLICATION_SERVER
procedure for the primary Recovery Appliance.The following example creates the replication server configuration named
raprimary_rep
for the primary Recovery Appliance:BEGIN DBMS_RA.CREATE_REPLICATION_SERVER ( replication_server_name => 'raprimary_rep', sbt_so_name => '/u01/app/oracle/product/12.1.0.2/dbh1/lib/libra.so', catalog_user_name => 'RASYS', wallet_alias => 'rapribrf-scan.acme.com:1522/rapri', wallet_path => 'file:/dbfs_repdbfs/REPLICATION'); END;
-
Confirm the creation of the replication server configuration. The
replication_server_name
is converted to upper-case and stored as such. Therefore queries with the name should also be upper-case.For example, run the following query:
SELECT COUNT(*) should_be_one FROM RA_REPLICATION_SERVER WHERE REPLICATION_SERVER_NAME = 'RAPRIMARY_REP'; SHOULD_BE_ONE ------------- 1
If the configuration was created correctly, then the return value is
1
.
Task 3: Associate the alternate Recovery Appliance with the protection policy for Backup and Redo Failover
Specify the primary Recovery Appliance to which the alternate Recovery Appliance forwards backups after an outage by assigning the replication server configuration to a protection policy.
This task assumes the following:
-
You want to use the replication server configuration named
raprimary_rep
, which you created in "Task 2: Create the replication server configuration on the alternate Recovery Appliance". -
You want to add the replication server configuration to protection policy
alt_brf
, which you created in "Task 1 Create a protection policy for Backup and Redo Failover on the alternate Recovery Appliance".
To associate the replication server configuration with the Backup and Redo Failover protection policy:
-
Ensure you are connected to the metadata database on the alternate Recovery Appliance as the Recovery Appliance administrator.
-
Run the
DBMS_RA.ADD_REPLICATION_SERVER
procedure for the Backup and Redo Failover protection policy and replication server configuration.For example, execute the following PL/SQL program:
BEGIN DBMS_RA.ADD_REPLICATION_SERVER ( replication_server_name => 'raprimary_rep', protection_policy_name => 'alt_brf'); END;
See Also: