Documente Academic
Documente Profesional
Documente Cultură
Log in as RASYS to the ZDLRA database (primary or standby). This can be done locally on
the ZDLRA, or remotely using SQL*net.
PROCEDURE create_protection_policy (
protection_policy_name IN VARCHAR2,
description IN VARCHAR2 DEFAULT NULL,
storage_location_name IN VARCHAR2,
polling_policy_name IN VARCHAR2 DEFAULT NULL,
recovery_window_goal IN DSINTERVAL_UNCONSTRAINED,
max_retention_window IN DSINTERVAL_UNCONSTRAINED DEFAULT NULL,
recovery_window_sbt IN DSINTERVAL_UNCONSTRAINED DEFAULT NULL,
unprotected_window IN DSINTERVAL_UNCONSTRAINED DEFAULT NULL,
guaranteed_copy IN VARCHAR2 DEFAULT 'NO',
allow_backup_deletion IN VARCHAR2 DEFAULT 'YES',
store_and_forward IN VARCHAR2 DEFAULT 'NO');
Example
Exec dbms_ra. create_protection_policy (
‘GOLD_POLICY’,
‘Gold Protection Policy’,
‘DELTA’,
null,
INTERVAL '30' DAY,
null,
null,
INTERVAL '15' minute,
‘NO’ ,
'YES',
'NO');
Create the VPC user account on the primary ZDLRA and on the standby
ZDLRA (this is only necessary if you want a new user).
Log in as RASYS to the ZDLRA database (primary or standby). This can be done locally on
the ZDLRA, or remotely using SQL*net.
Discover the protected database in Enterprise Manager (if not already done).
From the protected database Home page, select the menu item Availability > Backup &
Recovery > Recovery Catalog Settings.
Select Use Recovery Catalog and in the Recovery Catalog choice list select the
Recovery Appliance virtual private catalog (VPC) that the protected database was
registered with during the external configuration process. (If the required VPC is not in
the list, that means Enterprise Manager was not used by the Recovery Appliance
administrator to enroll the database with the Recovery Appliance, in which case the
steps below must be performed.)
This issue can be addressed by performing the following steps to make Enterprise
Manager aware of the VPC:
In the Enterprise Manager Targets menu, select Databases; on the Databases page,
select the menu item Availability > Recovery Catalogs.
Select the base Recovery Appliance catalog, then click Manage Virtual Private
Catalogs.
Select the Manage an existing virtual private catalog with Enterprise Manager radio
button and continue through the process.
Add the primary database to the primary ZDLRA metadata and standby
ZDLRA metadata
NOTE – You can only register a primary database (not a standby). You will be
registering the db_unique_name of the primary database on both the primary ZDLRA
and the standby ZDLRA.
NOTE – The steps can be delayed on the Dataguard Database if it is created later.
o Once connected execute the add_db procedure to make the DB known to the
ZDLRA (this procedure has specific parameters that need to be set). NOTE : this only
adds metadata to the ZDLRA configuration, not the RMAN catalog.
DBMS_RA.ADD_DB
PROCEDURE add_db (
db_unique_name IN VARCHAR2,
protection_policy_name IN VARCHAR2,
reserved_space IN VARCHAR2);
Example
Dbms_ra. add_db (
‘mydb’,
‘OLD’,
‘1500G’);
Allow VPC users to manage the primary database on both primary
ZDLRA and standby ZDLRA
NOTE – You can only register a primary database (not a standby). You will be
registering the db_unique_name of the primary database on both the primary ZDLRA
and the standby ZDLRA.
NOTE – The steps can be delayed on the Dataguard Database if it is created later.
o Also connect the ZDLRA database VPC user to the database so that the VPCUSER
account can used to manage the new database. This account is used for backing
up/Restoring the database. Multiple VPCUSERS can be allowed to manage the
database, but typically only one is used.
PROCEDURE grant_db_access (
username IN VARCHAR2,
--- Username of the Recovery appliance user (
the VPCUSER)
db_unique_name IN VARCHAR2);
Example
Dbms_ra. grant_db_access (
‘VPCUSER1’,
‘mydb’);
Prepare the Protected database servers to register the primary database
and the standby database.
NOTE – The steps can be delayed on the Standby Database server(s) if it is created later.
Download the current backup module from oracle. It can be found here
Execute the ra_install.jar using information from the README file. The two steps that need
to be completed are
o Creating the wallet file to store ZDLRA catalog credentials
o Download the current libra.so file for the appropriate OS/platform.
For a RAC cluster, either execute this process on all nodes, or add the configuration files on
all nodes
o Wallet file
o Libra.so
o Sqlnet.ora changes
Example
Add the connect string/VPC user for both the primary ZDLRA and the
standby ZDLRA. This needs to be done for both the primary database
server(s) and the standby database server(s)
This must be done on every host in a rac cluster (the sqlnet.ora and
wallet file can be copied between nodes)
Each database home connecting to the ZDLRA needs to have this done,
and it needs to be copied over to any new installations.
Test the wallet file entry through sqlplus on the ALL database server(s) for both
the primary ZDLRA and the standby ZDLRA.
Example
Sqlplus /@slcm_adm03_scan.us.mycompany.com:1521/zdlra1:dedicated
Add wallet location lines to sqlnet.ora. This is an optional step if not utilizing real-
time redo for any databases in this $ORACLE_HOME location. It should look like this.
SQLNET.WALLET_OVERRIDE = true
WALLET_LOCATION =
(SOURCE =
(METHOD = FILE)
(METHOD_DATA =
(DIRECTORY = <ORACLE_HOME>/dbs/zdlra
)
)
Download the current libra.so file from here OR copy the current libra.so file from
another server utilizing the same OS/platform
This typically sits in the $ORACLE_HOME/lib directory.
This needs to be done for all nodes in a RAC cluster. The library can be copied from
one node to another.
Register the primary protected database with the primary ZDLRA and standby
ZDLRA
NOTE – You can only register a primary database (not a standby). You will be registering the
primary database on both the primary ZDLRA and the standby ZDLRA.
Register database with the ZDLRA RMAN catalog on both the primary ZDLRA and the standby ZDLRA
through the RMAN client on protected database. With the wallet in place, you will be able to connect to
the recovery catalog.
NOTE : after registering the database manually, from within OEM you will see a message on the screen
Click on “recovery catalog settings” and change the database to use a recovery catalog rather than the
controlfile.
Configure real-time redo apply for the primary protected database and the
standby database(Optional).
If the automated ra_install.jar process was used to configure the ZDLRA, then ensure
you followed the steps to add the wallet location to the SQLNET.ORA file.
REMOTE_LOGIN_PASSWORDFILE=shared
LOG_ARCHIVE_FORMAT=’log_%d_%t_%s_%r.arc’
From the protected database, alter the archive log configuration to include both the
ZDLRA, and the current protected database
NOTE – You will be adding the VPC user for both primary ZDLRA and the standby ZDLRA.
From the primary protected database, create the vpc users in the database that will
be used to send primary redo logs.
SQL> alter system archive log current; -- ensure it transfers to standby database.
Copy the password file from the primary database to the standby database
NOTE – This must be after the VPCUSER for the standby database is created to ensure
it contains both.
TESTING -- Execute on both the primary and the dataguard database. You should see
both VPC users in the password file
NOTE – If the Standby database is created later, this step can be delayed.
Update the next log destination to contain primary ZDLRA connection information.
Use the connect string specified when creating the wallet file
Update the next log destination to contain standby ZDLRA connection information.
Use the connect string specified when creating the wallet file
RMAN> CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM <n> BACKUP TYPE TO BACKUPSET;
Backing up databases
RMAN>run
{
backup cumulative incremental level 0 section size 32g database plus archivelog
not backed up;
}
{
backup cumulative incremental level 1 database plus archivelog not backed up;
}
Architectural view
Environment
Final environment
The configuration should be symmetrical to ensure backups work regardless of which datacenter is
primary and which is standby. It is critical all these pieces match.
Wallet files
Both VPC users exist in the database
Password files
Redo destinations in databases should point to local ZDLRA
Redo transport users should be local ZDLRA VPC user
Appendix
Each connect string in the wallet file can only be configured for a single VPC user.
The best workaround is to add entries in the TNSNAMES.ORA file. You can then use the
TNS_NAMES entry in the wallet, channel configuration etc.
Steps are identified in the configure database guide for the ZDLRA
Rman script to restore a Standby database file from the primary ZDLRA would look like
this. This can be changed for other situations.