Configuring the Protected Database for Backup and Redo Failover
After you configure replication for Backup and Redo Failover, the protected database administrator should perform the tasks in this section so that the protected database can send backups to the primary Recovery Appliance under normal conditions, and to the alternate Recovery Appliance during a planned or unplanned outage.
Task 1: Configure sqlnet.ora to point to the wallet location
Ensure that the sqlnet.ora file contains the location of the Oracle wallet.
The following example shows how the wallet location entry should appear:
SQLNET.WALLET_OVERRIDE = true WALLET_LOCATION = (SOURCE = (METHOD = FILE) (METHOD_DATA = (DIRECTORY = /u01/app/oracle/product/12.1.0/dbhome_1/dbs/zdlra) ) )
Task 2: Create an auto-login wallet in the location specified in sqlnet.ora
The following example creates an auto-login wallet in the directory specified in "Task 1: Configure sqlnet.ora to point to the wallet location":
$ mkstore -wrl /u01/app/oracle/product/12.1.0/dbhome_1/dbs/zdlra/ -createALO
Task 3: Add the credentials for the primary and alternate Recovery Appliances to the wallet
In this task the protected database administrator adds credentials for the primary and alternate appliances using the VPC user you created in "Task 1: Create a VPC user account and a replication user account on the primary Recovery Appliance" to the wallet.
The following examples add the vpcuser
credentials for the primary appliance rapribrf-scan.acme.com:1521/rapri:dedicated
and the alternate appliance raaltbrf-scan.acme.com:1521/raalt:dedicated
to the wallet on the protected database:
$ mkstore -wrl /u01/app/oracle/product/12.1.0/dbhome_1/dbs/zdlra/ -createCredential "rapribrf-scan.acme.com:1521/rapri:dedicated" "vpcuser" "pwd" $ mkstore -wrl /u01/app/oracle/product/12.1.0/dbhome_1/dbs/zdlra/ -createCredential "raaltbrf-scan.acme.com:1521/raalt:dedicated" "vpcuser" "pwd"
Task 4: Register the database with the alternate Recovery Appliance and back up the control file
For this task, the protected database administrator performs steps 1 and 2, and the Recovery Appliance administrator performs step 3.
To register the database and back up the control file:
-
Using RMAN, connect to the protected database as
TARGET
and to the alternate Recovery Appliance catalog asCATALOG
, and then run theREGISTER DATABASE
command. -
After the
REGISTER DATABASE
command is completed, back up the current control file to the alternate appliance:BACKUP DEVICE TYPE SBT CURRENT CONTROLFILE;
-
Verify that the control file backup was replicated from the alternate appliance to the primary appliance.
Task 5: Ensure that the database is registered with the primary Recovery Appliance
This step is to confirm that the protected database is registered with the primary appliance. Because replication is configured when the database is registered with the alternate appliance in the previous task, the database should automatically be registered with the primary appliance.
To confirm registration with the primary appliance:
-
In RMAN, connect to the database using the primary appliance credentials in the CATALOG connect string.
rman TARGET / CATALOG /@rapribrf-scan.acme.com:1521/rapri:dedicated
-
Run the
REGISTER DATABASE
command.The following error should display:
RMAN-20002: target database already registered in recovery catalog
Note:
-
The protected database administrator must also create a separate
RMAN
backup script that directs backups to the alternate Recovery Appliance when the primary appliance is not available, and redirects backups to the primary appliance when it is back in service. This script must connect to the alternate Recovery Appliance catalog and have theCONFIGURE CHANNEL
orALLOCATE CHANNEL
command withcredential_alias
set to the alternate appliance. See Zero Data Loss Recovery Appliance Protected Database Configuration Guide for an example of how to create an RMAN backup script for the Recovery Appliance. -
To send real time redo to the alternate Recovery Appliance during the outage of the primary appliance, an additional log archive destination must be defined as an
ALTERNATE
for the log archive destination used to connect to the primary appliance. The connect string must be defined in the Oracle auto-login wallet, similar to the connect string required for the primary appliance, and using the same VPC user (although the password may be different). See Data Guard Concepts and Administration for an example of how to use theALTERNATE
attribute to automatically fail over to a alternate remote destination.