Configuring the Primary Recovery Appliance for Backup and Redo Failover
To configure the primary Recovery Appliance for Backup and Redo Failover, you perform many of the tasks for setting up a downstream Recovery Appliance in a replication scenario.
Task 1: Create a VPC user account and a replication user account on the primary Recovery Appliance
Follow the instructions in "racli add db_user".
For example, log in to the Recovery appliance as root, change to the bin directory, and use the following command to create the VPC user:
# ./racli add db_user --user_name=vpcuser --user_type=vpc
Enter the password for vpcuser
user when prompted.
To create the replication user repuser_from_alternate
with the CREATE SESSION
privilege:
CREATE USER repuser_from_alternate IDENTIFIED BY password;
GRANT CREATE SESSION TO repuser_from_alternate;
The user_name
created on the alternate must be the same as the VPC user created on the primary. However, the passwords do not need to be the same.
Task 2 Create a protection policy on the primary Recovery Appliance
Follow the instructions in Creating a Protection Policy. Ensure that the store_and_forward
field is set to NO
.
For example, execute the following PL/SQL program to create a primary_brf
policy:
BEGIN DBMS_RA.CREATE_PROTECTION_POLICY ( protection_policy_name => 'primary_brf', description => 'For protected dbs on primary', storage_location_name => 'delta', recovery_window_goal => INTERVAL '28' DAY, guaranteed_copy => 'NO', store_and_forward => 'NO'); END;
Task 3: Add a database to the protection policy on the primary Recovery Appliance
Follow the instructions in "Enrolling Protected Databases".
For example, execute the following PL/SQL program to add orcl12
to the primary_brf
policy that you created in the previous task:
BEGIN DBMS_RA.ADD_DB ( db_unique_name => 'orcl12', protection_policy_name => 'primary_brf', reserved_space => '128G'); END;
Task 4: Grant database access to the VPC user and the replication user on the primary Recovery Appliance
Follow the instructions in "Enrolling Protected Databases".
For example, execute the following PL/SQL programs to grant the VPC user vpcuser
and the replication user repuser_from_alternate
the required privileges on protected database orcl12
:
BEGIN DBMS_RA.GRANT_DB_ACCESS ( username => 'vpcuser', db_unique_name => 'orcl12'); END; BEGIN DBMS_RA.GRANT_DB_ACCESS ( username => 'repuser_from_alternate', db_unique_name => 'orcl12'); END;