zero-data-loss-recovery-appliance-protected-database-configuration-guide
zero-data-loss-recovery-appliance-protected-database-configuration-guide
Release 21.1
F29369-01
November 2021
Zero Data Loss Recovery Appliance Protected Database Configuration Guide, Release 21.1
F29369-01
Contributors: Andrew Babb, Anand Beldalker, Jin-Jwei Chen, Tim Chien, Sean Connelly, Donna Cooksey,
Sam Corso, Steve Fogel, Muthu Olagappan, Jony Safi, Daniel Sears, Lawrence To, Steve Wertheimer
This software and related documentation are provided under a license agreement containing restrictions on
use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your
license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license,
transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse
engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is
prohibited.
The information contained herein is subject to change without notice and is not warranted to be error-free. If
you find any errors, please report them to us in writing.
If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on
behalf of the U.S. Government, then the following notice is applicable:
U.S. GOVERNMENT END USERS: Oracle programs (including any operating system, integrated software,
any programs embedded, installed or activated on delivered hardware, and modifications of such programs)
and Oracle computer documentation or other Oracle data delivered to or accessed by U.S. Government end
users are "commercial computer software" or "commercial computer software documentation" pursuant to the
applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, the use,
reproduction, duplication, release, display, disclosure, modification, preparation of derivative works, and/or
adaptation of i) Oracle programs (including any operating system, integrated software, any programs
embedded, installed or activated on delivered hardware, and modifications of such programs), ii) Oracle
computer documentation and/or iii) other Oracle data, is subject to the rights and limitations specified in the
license contained in the applicable contract. The terms governing the U.S. Government’s use of Oracle cloud
services are defined by the applicable contract for such services. No other rights are granted to the U.S.
Government.
This software or hardware is developed for general use in a variety of information management applications.
It is not developed or intended for use in any inherently dangerous applications, including applications that
may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you
shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its
safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this
software or hardware in dangerous applications.
Oracle, Java, and MySQL are registered trademarks of Oracle and/or its affiliates. Other names may be
trademarks of their respective owners.
Intel and Intel Inside are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are
used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Epyc,
and the AMD logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered
trademark of The Open Group.
This software or hardware and documentation may provide access to or information about content, products,
and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly
disclaim all warranties of any kind with respect to third-party content, products, and services unless otherwise
set forth in an applicable agreement between you and Oracle. Oracle Corporation and its affiliates will not be
responsible for any loss, costs, or damages incurred due to your access to or use of third-party content,
products, or services, except as set forth in an applicable agreement between you and Oracle.
Contents
Preface
Audience xi
Documentation Accessibility xi
Related Documents xi
Conventions xi
iii
Protected Database Administration Task Flow 1-14
iv
Accessing the Protected Database Home Page Using Cloud Control 4-13
Enrolling the Protected Database with Recovery Appliance (Command Line) 4-14
Installing the Recovery Appliance Backup Module 4-15
Preparing to Install the Recovery Appliance Backup Module 4-16
Obtaining the Installer for the Recovery Appliance Backup Module 4-16
Running the Recovery Appliance Backup Module Installer 4-17
Enrolling Oracle 10g Protected Databases 4-18
Registering a Protected Database with the Recovery Appliance Catalog 4-19
Configuring Backup and Recovery Settings for Protected Databases (Cloud Control) 4-19
Configuring Backup Settings for Protected Databases Using Cloud Control 4-20
Configuring Recovery Settings for Protected Databases Using Cloud Control 4-23
Clearing the Backup Configuration of Protected Databases Using Cloud Control 4-25
Configuring Backup and Recovery Settings for Protected Databases (Command Line) 4-25
Configuring Backup Settings for Protected Databases Using the Command Line 4-26
Configuring Real-Time Redo Transport 4-26
Creating an Oracle Wallet on the Protected Database 4-29
Configuring Recovery Settings for Protected Databases Using the Command Line 4-30
Using RMAN Channels for Recovery Appliance Backup and Recovery Operations 4-31
Configuring RMAN SBT Channels for Recovery Appliance 4-31
Allocating RMAN SBT Channels for Recovery Appliance 4-32
Performing Test Backup and Recovery Operations 4-32
Running a Test Backup Using the Command Line 4-32
Running a Test Recovery Using the Command Line 4-33
Performing a Test Backup Using Cloud Control 4-34
Configuring Multiple Protected Databases to Send Backups to Recovery Appliance 4-34
Update EM Software Library with Latest Version of RMAN Recovery Appliance Backup
Module 4-35
Option 1: Configuring EM for Automatic Upload of RMAN Module to Software
Library 4-35
Option 2: Using EMCLI to Manually Upload RMAN Backup Module to Software
Library 4-38
Scenario #1: Configure Multiple Protected Databases to Send Backups to Recovery
Appliance 4-38
Single-instance Database 4-38
One Cluster Database 4-39
Single-Instance and Cluster Databases 4-39
Multiple Databases from an Input File 4-39
Maintaining Protected Database Configurations 4-40
Scenario #2: Update the RMAN Recovery Appliance Backup Module for Multiple
Protected Databases 4-40
Installing RMAN Backup Module on a Single-Instance Database 4-41
Installing RMAN Backup Module on a Cluster Database 4-41
v
Installing RMAN Backup Module on Multiple Databases 4-41
vi
Recovering Specific Tablespaces in a PDB 6-12
Example: Recovering a PDB in an Oracle RAC Environment 6-13
Example: Restoring and Recovering One or Many Data Blocks in a PDB 6-14
Example: Recovering a Database Configured for Real-Time Redo Transport After a
Severe Storage Failure 6-15
Example: Recovering the Control File and Database When Real-Time Redo Transport
is Configured 6-16
Database Duplication from Recovery Appliance 6-17
Creating a Standby Database for a Protected Database 6-18
Cloning a Protected Database 6-19
Index
vii
List of Examples
4-1 Creating an Oracle Wallet on the Protected Database 4-30
4-2 Creating an Oracle Wallet with Multiple User Credentials 4-30
4-3 Configuring an RMAN Channel for Recovery Appliance 4-32
4-4 Allocating RMAN Channels for Recovery Appliance 4-32
viii
List of Figures
1-1 Recovery Appliance Architecture and Protected Databases 1-3
4-1 Protected Database Home Page 4-14
4-2 Backup Settings Page for Protected Databases 4-21
4-3 Protected Database Recovery Settings 4-24
4-4 Recovery Appliance Settings Section of Backup Settings Page 4-34
4-5 Create Library Job 4-36
4-6 Create Library Job, General Tab 4-36
4-7 Create Library Job, Parameter Tab 4-36
4-8 Create Library Job, Schedule Tab 4-37
4-9 Job Output when new software module found 4-37
5-1 Schedule Protected Database Backup 5-3
5-2 Protected Database Backup Reports 5-8
5-3 Job Activity Report for Protected Database Backup Jobs 5-12
5-4 Enterprise Manager and turning off recovery protection 5-13
5-5 Enterprise Manager and turning off recovery protection 5-14
ix
List of Tables
4-1 Recovery Appliance Backup Module Installer Parameters 4-4
4-2 Protected Database Backup Settings 4-6
4-3 Protected Database Recovery Settings 4-7
A-1 Modified RMAN Commands A-1
x
Preface
Welcome to the Zero Data Loss Recovery Appliance Protected Database Configuration
Guide.
This preface contains the following topics:
• Audience
• Documentation Accessibility
• Related Documents
• Conventions
Audience
This document is intended for a database backup administrator who will configure and
administer a protected database to send backups to Zero Data Loss Recovery Appliance,
commonly known as Recovery Appliance.
Documentation Accessibility
For information about Oracle's commitment to accessibility, visit the Oracle Accessibility
Program website at http://www.oracle.com/pls/topic/lookup?ctx=acc&id=docacc.
Related Documents
For more information, see the following documents:
• Zero Data Loss Recovery Appliance Administrator's Guide
• Oracle Database Backup and Recovery User's Guide
• Oracle Database Backup and Recovery Reference
• Oracle Secure Backup Administrator's Guide
Conventions
The following text conventions are used in this document:
xi
Preface
Convention Meaning
boldface Boldface type indicates graphical user interface elements associated
with an action, or terms defined in text or the glossary.
italic Italic type indicates book titles, emphasis, or placeholder variables for
which you supply particular values.
monospace Monospace type indicates commands within a paragraph, URLs, code
in examples, text that appears on the screen, or text that you enter.
xii
1
Getting Started with Recovery Appliance
This chapter provides an overview of Zero Data Loss Recovery Appliance, commonly known
as Recovery Appliance, and describes the high-level steps required to use Recovery
Appliance for data protection.
This chapter contains the following topics:
• Overview of Recovery Appliance
• Overview of Protected Databases
• Backup and Recovery Concepts for Protected Databases
• Tools for Protected Database Operations
• Protected Database Administration Task Flow
See Also:
Zero Data Loss Recovery Appliance Administrator's Guide for more information
about Recovery Appliance architecture and features
1-1
Chapter 1
Overview of Protected Databases
1-2
Chapter 1
Overview of Protected Databases
Oracle
Protected Enterprise
Database Manager
Cloud
Delta Store Control
Compresses
and
Protected Validates
Database Backups
Recovery
Appliance
Tape
Protected Incremental Library
Database Forever
Backups Oracle Secure
and Backup
Real-Time
Redo
Protected Ca
ta log
Tape
Database Archival
Recovery
Catalog
Recovery
Protected Appliance Replicated
Database Metadata Backups
Database
Downstream
Protected Recovery
Database Appliance
The Recovery Appliance receives incremental backups and redo data from multiple protected
databases. It continuously validates backups at the Oracle block level thus assuring
recoverability of data. Backups are compressed to optimize storage utilization before they are
stored in the delta store. The delta store is the sum total of all Recovery Appliance storage
that is used to store protected database backup data. All data file and archived redo log
backups are stored in the delta store. Recovery Appliance creates virtual full backups of the
protected database, which is a complete database image as of one distinct point in time.
The Recovery Appliance metadata database is the Oracle database that runs inside of the
Recovery Appliance. It stores configuration data such as definitions, protection policy
definitions, and client database definitions. The metadata database also stores backup
metadata and contains the Recovery Appliance catalog.
Oracle Secure Backup, the tape management component of Recovery Appliance, is
preinstalled on the Recovery Appliance and is used to archive backups to an attached tape
library.
Oracle Enterprise Manager Cloud Control (Cloud Control) provides a unified backup
management interface for the entire life cycle of backups. You can use Cloud Control to back
up, recover, and report on protected databases.
As part of the disaster recovery strategy, Recovery Appliance can replicate protected
database backups to other Recovery Appliances. When you configure replication, a Recovery
Appliance (called the upstream Recovery Appliance) forwards backups to another Recovery
Appliance (called the downstream Recovery Appliance). Recovery Appliance supports a wide
variety of replication topologies.
1-3
Chapter 1
Overview of Protected Databases
See Also:
1-4
Chapter 1
Overview of Protected Databases
1-5
Chapter 1
Overview of Protected Databases
See Also:
1-6
Chapter 1
Overview of Protected Databases
See Also:
Zero Data Loss Recovery Appliance Administrator's Guide for information about the
different Recovery Appliance user accounts
See Also:
Zero Data Loss Recovery Appliance Administrator's Guide for information about
creating and maintaining protection policies
1-7
Chapter 1
Overview of Protected Databases
Before you send protected database backups to a Recovery Appliance, you must
enroll the protected database with the Recovery Appliance and configure settings.
• Recovery Appliance automatically picks up protected database backups from a
shared location
Instead of directly interacting with a Recovery Appliance, the protected database
writes backups to a configured shared storage location. The Recovery Appliance
uses backup polling to periodically check the shared storage location and pick up
new backups stored in this location.
See Also:
See Also:
1-8
Chapter 1
Backup and Recovery Concepts for Protected Databases
Appliance catalog without also using the Recovery Appliance as a backup repository.
Protected database administrators connect to the Recovery Appliance catalog using the
same Recovery Appliance user that is used for backup and recovery operations.
After you enroll a protected database with a Recovery Appliance, you must register it with the
Recovery Appliance catalog. Registering the protected database stores backup metadata for
the protected database in the Recovery Appliance catalog. Existing backup metadata that is
currently stored in the protected database's RMAN recovery catalog must be imported into
the Recovery Appliance catalog.
See Also:
1-9
Chapter 1
Backup and Recovery Concepts for Protected Databases
See Also:
"Using RMAN Channels for Recovery Appliance Backup and Recovery
Operations"
A good backup strategy must ensure that backups created can actually be restored
and used successfully. Because Recovery Appliance validates incoming backups for
Oracle block correctness before storing them, you need not include a RESTORE
VALIDATE command in your periodic full restore and recovery testing. Even virtual
backups are periodically validated in-place by a background task running on the
Recovery Appliance.
See Also:
"About the Recovery Appliance Incremental-Forever Backup Strategy"
1-10
Chapter 1
Backup and Recovery Concepts for Protected Databases
See Also:
Oracle Secure Backup Administrator's Guide for information about hardware-based
encryption
1-11
Chapter 1
Backup and Recovery Concepts for Protected Databases
also allows new Transparent Data Encrypted (TDE) databases, and re-key or master
key rotation of existing TDE databases to continue with the incremental forever backup
strategy for creating virtual full backups on the Recovery Appliance. Smart incremental
backups are enabled by default.
Oracle recommends that you take frequent backups of the archived redo log files and
include them in both full and incremental backups. Even with real-time redo, the
recommended L1 incremental backup script includes archived logs that have not yet
been backed up as a safety measure just in case some logs were not sent due to a
Recovery Appliance outage. Alternatively, you can use RMAN to backup archived logs
to the Recovery Appliance.
Note:
"About Real-Time Redo Transport"
• With the Recovery Appliance incremental-forever backup strategy, only one level 0
incremental backup is required. Subsequently, level 1 incremental backups are
created and stored on the Recovery Appliance. A virtual full backup is created by
referencing blocks from the initial level 0 and subsequent level 1 backups.
Following is an example of a script that implements the Recovery Appliance
incremental-forever backup strategy:
BACKUP CUMULATIVE INCREMENTAL LEVEL 1
DEVICE TYPE sbt FORMAT '%d_%U' TAG '%TAG'
DATABASE;
BACKUP DEVICE TYPE sbt FORMAT '%d_%U' TAG '%TAG'
ARCHIVELOG ALL NOT BACKED UP;
1-12
Chapter 1
Backup and Recovery Concepts for Protected Databases
See Also:
Zero Data Loss Recovery Appliance Administrator's Guide for information about
Oracle Database releases for which real-time redo transport is supported
See Also:
Oracle Data Guard Concepts and Administration for information about
asynchronous redo transport services
If the protected database crashes, redo data received from the current redo log group until
the time of the crash is backed up at the Recovery Appliance as a "partial" archived redo log.
If the protected database is reopened, crash recovery of the protected database will complete
the current redo log group at the time of the crash, and the completed redo log will be re-
shipped to the Recovery Appliance through the automatic Data Guard Gap fetching feature.
The "complete" archived redo log will be used in any future restore/recover operations
instead of the previously backed up "partial" archived redo log.
During recovery of a protected database, partial and complete archived logs are
automatically restored as required to completely recover the protected database.
1-13
Chapter 1
Tools for Protected Database Operations
redo data from the protected database to the Recovery Appliance. This user must be
the same as the Recovery Appliance user that will be used to send protected database
backups to the Recovery Appliance. The credentials of this Recovery Appliance user
are stored in an Oracle wallet on the protected database.
On the protected database, configure ARCHIVELOG mode and set up an archive
destination for redo data (using the LOG_ARCHIVE_DEST_n parameter) that points to the
service name of the Recovery Appliance.
See Also:
"Configuring Real-Time Redo Transport"
See Also:
Zero Data Loss Recovery Appliance Administrator's Guide for the workflow
to manage a Recovery Appliance environment
The task flow for setting up and using Recovery Appliance for enterprise data
protection is as follows:
1-14
Chapter 1
Protected Database Administration Task Flow
See Also:
See Also:
4. Perform a test backup to verify that your protected database configuration is accurate.
It is recommended that you perform a test backup when configuration settings are initially
set or subsequently modified.
See Also:
"Performing Test Backup and Recovery Operations"
See Also:
1-15
Chapter 1
Protected Database Administration Task Flow
6. Perform test restore and recovery to assure yourself that the protected database
can be recovered using the backups stored on the Recovery Appliance.
See Also:
"Recovering Data from Recovery Appliance "
7. In the event of a failure (caused by a media failure or data corruption), recover the
protected database using backups stored on the Recovery Appliance.
Depending on the type of failure, you can recover the entire protected database or
just the affected database files.
See Also:
1-16
2
Migration Considerations for Protected
Database Administrators
This chapter discusses strategies to migrate from an existing backup strategy to one that
uses Recovery Appliance.
This chapter contains the following topics:
• Planning to Migrate Protected Databases to Recovery Appliance
• Adapting an Existing Backup Strategy for Recovery Appliance
• Migrating Backup Metadata to the Recovery Appliance Catalog
• Migrating Existing Backups to Recovery Appliance
See Also:
"Adapting an Existing Backup Strategy for Recovery Appliance"
2-1
Chapter 2
Adapting an Existing Backup Strategy for Recovery Appliance
See Also:
"Migrating Backup Metadata to the Recovery Appliance Catalog"
See Also:
"Migrating Existing Backups to Recovery Appliance"
See Also:
2-2
Chapter 2
Adapting an Existing Backup Strategy for Recovery Appliance
See Also:
"Using RMAN Channels for Recovery Appliance Backup and Recovery Operations"
for examples of allocating or configuring RMAN channels for use with Recovery
Appliance
If your existing backup strategy uses the RMAN incrementally updated backup strategy that
merges successive level 1 incremental backups with the initial image copy backup, then
modify the RMAN commands to use the Recovery Appliance incremental-forever backup
strategy.
See Also:
2-3
Chapter 2
Migrating Backup Metadata to the Recovery Appliance Catalog
strategy to use Recovery Appliance. While adapting your existing strategy to use
Recovery Appliance, remove the VALIDATE and CROSSCHECK commands from your
scripts.
From your existing backup strategy, you also need to remove those operations that will
now be performed by Recovery Appliance, such as backing up to tape and deleting
obsolete backups.
See Also:
See Also:
"Importing Protected Database Metadata into the Recovery Appliance
Catalog"
• Retain existing backup metadata in the RMAN recovery catalog and store
metadata for backups created to Recovery Appliance in the Recovery Appliance
catalog
You must manage the RMAN recovery catalog in conjunction with the Recovery
Appliance catalog. To create local backups and store the backup metadata in the
RMAN recovery catalog, use the steps described in "Creating Local Backups". To
create backups to a Recovery Appliance, configure the protected database and
then back up to the Recovery Appliance.
2-4
Chapter 2
Migrating Backup Metadata to the Recovery Appliance Catalog
See Also:
2. Use the CONNECT command to connect to the protected database as TARGET and to the
Recovery Appliance catalog as CATALOG.
The following command connects to the protected database as the SYS user.
ra_rman_user is the Recovery Appliance user that the protected database uses to
authenticate with the Recovery Appliance. ra1 is the net service name of the target
Recovery Appliance that is configured in the Oracle wallet. Enter the passwords for both
users when prompted.
RMAN> CONNECT TARGET sys as sysdba;
RMAN> CONNECT CATALOG ra_rman_user@ra1;
2. Use the CONNECT command to connect as TARGET to the root of the CDB and to the
Recovery Appliance catalog as CATALOG.
Note:
Connecting to the Recovery Appliance as CATALOG when connected to a PDB
as TARGET is not supported. When using the Recovery Appliance catalog,
RMAN must connect as TARGET to the root of the CDB for backup and recovery
operations.
The following command, run from the CDB, connects to the root as the common user
c##bkuser user. my_cdb is the net service name of the CDB. ra_rman_user is the
Recovery Appliance user that the protected database uses to authenticate with the
2-5
Chapter 2
Migrating Backup Metadata to the Recovery Appliance Catalog
Recovery Appliance. ra1 is the net service name of the target Recovery
Appliance. Enter the passwords for both users when prompted.
RMAN> CONNECT TARGET c##bkuser@my_cdb;
RMAN> CONNECT CATALOG ra_rman_user@ra1;
See Also:
Oracle Database Backup and Recovery User's Guide for additional
examples on connecting as TARGET to the root of a CDB
2-6
Chapter 2
Migrating Backup Metadata to the Recovery Appliance Catalog
b. Create a protection policy that will be used by the protected database whose
metadata is being migrated.
You can also use an existing protection policy, if it meets the requirements for the
protected database being migrated.
c. Enroll the protected database whose metadata is being migrated with the Recovery
Appliance.
See Also:
Zero Data Loss Recovery Appliance Administrator's Guide for more information
about performing these steps
See Also:
Oracle Database Upgrade Guide for information about upgrading a
database to Oracle Database 12c Release 1 (12.1).
b. Install the Recovery Appliance backup module that creates the shared library
required to transfer backup data to the Recovery Appliance.
Installing the backup module will create the Oracle wallet that contains credentials
used to authenticate the protected database with the Recovery Appliance.
See Also:
"Installing the Recovery Appliance Backup Module"
c. Connect as TARGET to the protected database and as CATALOG to the RMAN recovery
catalog that stores metadata for the protected database.
The following example connects as TARGET to the protected database and as CATALOG
to the source RMAN recovery catalog. The owner of the RMAN recovery catalog is
rman_cat11 and dbrcat11 is the net service name of the RMAN recovery catalog
database. Replace rmancat11_pswd with the password of the rman_cat11 user.
$ rman target / catalog rman_cat11/rmancat11_pswd@dbrcat11
d. Ensure that no backups from the protected database are being created to the RMAN
recovery catalog.
The following commands connect to SQL*Plus as the owner of the source RMAN
recovery catalog and query for backups that are being created to the RMAN recovery
catalog rman_cat11.
$ sqlplus rman_cat11/rmancat11_pswd@dbrcat11
SQL> SELECT username, module
2-7
Chapter 2
Migrating Backup Metadata to the Recovery Appliance Catalog
FROM v$session
WHERE username = 'RMAN_CAT11';
This query should not return any results. Rows returned indicate a connection
for what could be an ongoing backup or restore operation. If rows are
returned, verify that there are no connections, then retry the query.
e. Determine the number of backup pieces contained in the catalog for the
protected database.
The following example lists the number of backup pieces for the protected
database MY_PTDB:
SQL> SELECT db_name, COUNT(*)
FROM rc_backup_piece_details
WHERE db_name='MY_PTDB';
You can either verify the backups by restoring them or by using the
RESTORE ... VALIDATE command.
See Also:
Oracle Database Backup and Recovery Reference for details about
using the RESTORE ... VALIDATE command
g. Connect to SQL*Plus as the owner of the source RMAN recovery catalog and
run the dbmsrmansys.sql script. This script grants additional privileges that are
required for the RECOVERY_CATALOG_OWNER role.
$ sqlplus rman_cat11/rmancat11_pswd@dbrcat11
SQL> $ORACLE_HOME/rdbms/admin/dbmsrmansys.sql
SQL> exit
The rman_cat11 user owns the RMAN recovery catalog and the net service
name of the recovery catalog database is dbrcat11. Replace rmancat11_pswd
with the password of the rman_cat11 user.
h. On the Recovery Appliance, start an RMAN session and connect to the
Recovery Appliance as TARGET using the RASYS user and to the source RMAN
recovery catalog as CATALOG.
The following command connects as TARGET to the Recovery Appliance and as
CATALOG to the source RMAN recovery catalog.
$ rman target rasys/rasys_pswd
RMAN> CONNECT CATALOG rman_cat11/rmancat11_pswd@dbrcat11
2-8
Chapter 2
Migrating Backup Metadata to the Recovery Appliance Catalog
j. Repeat Steps 2.d through 2.f on the upgraded source RMAN recovery catalog to
verify that the upgraded catalog is fine and can be used to recover the protected
database.
2. Import the source RMAN recovery catalog into the Recovery Appliance catalog. The
credentials of the source RMAN recovery catalog are provided by the protected database
administrator.
Use the NO UNREGISTER clause to specify that the protected database must not be
unregistered from the source RMAN recovery catalog that it is currently using.
The following command imports all the metadata contained in the source RMAN recovery
catalog that is owned by the user rman_cat11 (replace rmancat11_pswd with the
password of the rman_cat11 user).
IMPORT CATALOG rman_cat11/rmancat11_pswd@dbrcat11 NO UNREGISTER;
The following command imports the metadata for the protected database with database
name MY_PTDB contained in the source RMAN recovery catalog that is owned by the user
rman_cat11 (replace rmancat11_pswd with the password of the rman_cat11 user).
IMPORT CATALOG rman_cat11/rmancat11_pswd@dbrcat11
DB_NAME 'MY_PTDB' NO UNREGISTER;
3. Verify that all the backup pieces are included in the Recovery Appliance catalog by
querying the RC_BACKUP_PIECE_DETAILS view.
Compare the number of rows returned by the query in Step 2.e of "Preparing to Import an
RMAN Recovery Catalog into Recovery Appliance" with the output of this step. The
number of backup pieces returned by both queries must be the same.
2-9
Chapter 2
Migrating Existing Backups to Recovery Appliance
See Also:
Oracle Database Backup and Recovery Reference for information about the
IMPORT CATALOG command
Note:
To begin using an incremental-forever backup strategy with Recovery
Appliance, you must first submit a level 0 incremental backup. If a recent
level 0 incremental backup already exists for a particular protected database,
it might be more convenient to migrate that backup into the Recovery
Appliance, rather than take another level 0 backup from the database. After
migrating the level 0 backup and any required existing level 1 backups and
archived log files, you can then begin the incremental-forever strategy by
sending level 1 incremental backups and archived log files.
The recommended strategy is to migrate all existing backups and switch immediately
to Recovery Appliance. Any backups created after you migrate existing backups must
be stored on the Recovery Appliance.
Use one of the following techniques to migrate existing protected database backups
that are stored on disk to the Recovery Appliance:
• Configure a backup polling location where all the existing protected database
backups can be placed. Next, set up the Recovery Appliance to poll this location
and pick up the protected database backups.
See "Setting Up Backup Polling to Migrate Existing Backups to the Recovery
Appliance".
If you have existing backups that are stored on tape, then use the steps described
in "Making Tape Backups Available to Recovery Appliance".
• Back up image copies that are stored on local disk storage as backup sets to the
Recovery Appliance using the RMAN BACKUP AS BACKUPSET COPY OF DATABASE
command. You must configure an SBT channel that corresponds to the Recovery
Appliance backup module, as described in "Configuring RMAN SBT Channels for
Recovery Appliance", before you run this command.
2-10
Chapter 2
Migrating Existing Backups to Recovery Appliance
See Also:
See Also:
Zero Data Loss Recovery Appliance Administrator's Guide
3. Mount the polling location directory on the Recovery Appliance database nodes as
described in "Mounting the NFS Storage for Backup Polling".
4. Verify that the backup sets have been imported by querying the ra_task view.
You can also query the rc_backup_piece_details view to display the backup pieces for
protected databases that are being polled.
2-11
Chapter 2
Migrating Existing Backups to Recovery Appliance
where options represent the NFS mount options, nfs_server_name is the host
name of the NFS server, directory_name is the directory on the NFS server, and
directory is the mount point directory.
The following example attaches the /backup/bkp_db_imp directory on the NFS
server myNFShost at the directory polling_import:
# mount -o rw,hard,rsize=32768,wsize=32768,tcp,vers=3,timeo=600,actimeo=0
myNFShost:/backup/bkp_db_imp/source_bkp_dir /polling_import
3. Ensure that the oracle user has read permission for the mounted directory.
See Also:
"Importing Protected Database Metadata Using the IMPORT CATALOG
Command"
2-12
Chapter 2
Migrating Existing Backups to Recovery Appliance
Because no location is specified in the command, the backups are stored in the local fast
recovery area that is configured for the protected database. To store backups on locally
configured tape devices, allocate an SBT channel that corresponds to the legacy media
management software.
2-13
Chapter 2
Migrating Existing Backups to Recovery Appliance
The following command connects as TARGET to the protected database with net
service name hr_ptdb and as CATALOG to an RMAN recovery catalog database
with net service name rco. hradm is a user with SYSBACKUP privileges on the
protected database and rco is the RMAN recovery catalog owner. Enter the
passwords for the hradm and rco users when prompted.
% rman TARGET hradm@hr_ptdb CATALOG rco@catdb
2. Allocate an RMAN channel of device type DISK to use backups stored on local
disk storage.
The following command allocates a disk channel that creates backups to the local
disk storage.
RMAN> ALLOCATE CHANNEL d1 DEVICE TYPE DISK;
3. Restore and recover the protected database using the RESTORE and RECOVER
commands respectively.
The following example performs complete recovery of the protected database:
RUN
{
STARTUP MOUNT;
ALLOCATE CHANNEL c1 DEVICE TYPE DISK;
RESTORE DATABASE;
RECOVER DATABASE;
ALTER DATABASE OPEN;
}
2-14
3
Configuring TLS Data Security on the Client
This section provides the steps required to configure TLS Data Security on the Client.
The client also requires some modifications to support TLS. The Recovery Appliance can use
https encryption alone, in dual mode http/https, or without encryption http, the default.
If you want to start using TLS, you need to perform the following steps.
1. Find the TCPS alias (example: zdlra_tcps) from Recovery Appliance host and copy it to
tnsnames.ora file on client database.
2. Update wallet, or create new one if previous one was created by mkstore. Create new
wallet using orapki. For example:
3. Copy raCA.pem from Recovery Appliance host to client database and import it into wallet
created or updated above.
6. Connect RMAN and update “CONFIGURE CHANNEL DEVICE” adding wallet info
3-1
Chapter 3
3-2
4
Configuring Protected Databases
This chapter describes how to configure protected databases for backup and recovery
operations with Recovery Appliance.
This chapter contains the following topics:
• Overview of Configuring Protected Databases for Recovery Appliance
• Enrolling the Protected Database with Recovery Appliance (Cloud Control)
• Enrolling the Protected Database with Recovery Appliance (Command Line)
• Configuring Backup and Recovery Settings for Protected Databases (Cloud Control)
• Configuring Backup and Recovery Settings for Protected Databases (Command Line)
• Performing Test Backup and Recovery Operations
Note:
Oracle recommends that you use a server parameter file for your protected
database.
Note:
Oracle wallets created by Cloud Control support HTTP transport only. The
Recovery Appliance does not support HTTPS transport at this time.
4-1
Chapter 4
Overview of Configuring Protected Databases for Recovery Appliance
See Also:
See Also:
See Also:
4-2
Chapter 4
Overview of Configuring Protected Databases for Recovery Appliance
backup module to transfer backup data over the network to the Recovery Appliance. The
backup module is referenced when allocating or configuring an RMAN SBT channel for
backup or recovery operations to the Recovery Appliance. All backups to the Recovery
Appliance, and all restores of complete backup sets, are performed by means of this backup
module.
See Also:
See Also:
"Configuration Parameters for the Recovery Appliance Backup Module" for the
configuration parameters that can be specified while installing the Recovery
Appliance backup module
4-3
Chapter 4
Overview of Configuring Protected Databases for Recovery Appliance
4-4
Chapter 4
Overview of Configuring Protected Databases for Recovery Appliance
See Also:
"Installing the Recovery Appliance Backup Module"
4-5
Chapter 4
Overview of Configuring Protected Databases for Recovery Appliance
See Also:
4-6
Chapter 4
Overview of Configuring Protected Databases for Recovery Appliance
See Also:
4-7
Chapter 4
Enrolling the Protected Database with Recovery Appliance (Cloud Control)
See Also:
4-8
Chapter 4
Enrolling the Protected Database with Recovery Appliance (Cloud Control)
The properties, roles, and privileges for this new user are displayed. Review the settings
and click Back to modify settings.
11. Click Finish to create the Enterprise Manager administrator.
4-9
Chapter 4
Enrolling the Protected Database with Recovery Appliance (Cloud Control)
See Also:
"Overview of Enrolling Protected Databases"
Note:
The Recovery Appliance Settings section that is used to register the
protected databases is displayed only for protected databases using Oracle
Database 11g Release 2 (11.2) or later. If the protected database release is
lower than 11.2, then use the command line to register the protected
database and configure virtual private catalog user credentials.
4-10
Chapter 4
Enrolling the Protected Database with Recovery Appliance (Cloud Control)
Note:
You can asynchronously transport the protected database redo data directly
to the Recovery Appliance by selecting Enable Real-Time Redo
Transport. However, you can also enable real-time redo transport while
configuring recovery settings for protected databases as described in
"Configuring Recovery Settings for Protected Databases Using Cloud
Control".
See Also:
Zero Data Loss Recovery Appliance Administrator's Guide
2. Grant the privileges required for performing backup and recovery operations to the
Recovery Appliance user that the protected database will use for authentication. This
Recovery Appliance user owns the virtual private catalog that stores metadata for the
protected database.
See Also:
Zero Data Loss Recovery Appliance Administrator's Guide
4-11
Chapter 4
Enrolling the Protected Database with Recovery Appliance (Cloud Control)
This creates the Oracle wallet that stores the credentials required to access the
Recovery Appliance and installs the shared library that transfers backup data to
the Recovery Appliance.
Note:
Oracle 10g protected databases require alternate manual steps for
installing the library and creating the wallet. See "Enrolling Oracle 10g
Protected Databases" for instructions on how to complete these tasks.
See Also:
"Installing the Recovery Appliance Backup Module"
4-12
Chapter 4
Enrolling the Protected Database with Recovery Appliance (Cloud Control)
If the required VPC is not in the list, continue with the following steps.
Make EM aware of databsase configurations made with Recovery Appliance VPC.
5. In the EM Targets menu, select Databases.
6. On the Databases page, select the menu item Availability > Recovery Catalogs.
7. Select the base Recovery Appliance catalog.
8. Select Manage Virtual Private Catalogs.
9. Select the radio button for Manage an existing virtual private catalog with Enterprise
Manager.
10. Continue through the process.
12. Select from the drop-down list the particular Recovery Appliance virtual private catalog
(VPC) with which the protected database was registered during the already-performed
configuration process.
The required VPC should be in the list, and this should complete the task.
EM becomes aware of Recovery Appliance VPCs when the Recovery Appliance
administrator runs the EM Add Protected Database workflow. If that operation is performed
outside of EM, EM is not be aware of the VPC and cannot perform the database-side
configuration to send backups to the Recovery Appliance or schedule backups to the
Recovery Appliance.
The problem will be apparent in the database Backup Settings page, if after selecting a
Recovery Appliance, the desired VPC is not listed in the Virtual Private Catalog User choice
list.
4-13
Chapter 4
Enrolling the Protected Database with Recovery Appliance (Command Line)
See Also:
Zero Data Loss Recovery Appliance Administrator's Guide
2. Grant the privileges required for performing backup and recovery operations to the
Recovery Appliance user that the protected database will use for authentication.
This Recovery Appliance user owns the virtual private catalog that stores
metadata for the protected database.
4-14
Chapter 4
Enrolling the Protected Database with Recovery Appliance (Command Line)
See Also:
Zero Data Loss Recovery Appliance Administrator's Guide
Note:
Oracle 10g protected databases require alternate manual steps for installing the
library and creating the wallet. See "Enrolling Oracle 10g Protected Databases"
for instructions on how to complete these tasks.
See Also:
"Installing the Recovery Appliance Backup Module"
Note:
Oracle 10g protected databases require alternate manual steps for installing the
library and creating the wallet. See "Enrolling Oracle 10g Protected Databases" for
instructions on how to complete these tasks.
4-15
Chapter 4
Enrolling the Protected Database with Recovery Appliance (Command Line)
See Also:
4-16
Chapter 4
Enrolling the Protected Database with Recovery Appliance (Command Line)
http://www.oracle.com/technetwork/database/availability/oracle-zdlra-backup-
module-2279224.html
2. Sign in using your OTN account credentials.
3. Select Accept License Agreement to accept the OTN license agreement.
4. Click All Supported Platforms to download the Recovery Appliance backup module for
your platform.
The Recovery Appliance installer is named ra_installer.zip.
See Also:
4-17
Chapter 4
Enrolling the Protected Database with Recovery Appliance (Command Line)
4. Add the credentials for the Recovery Appliance user (virtual private catalog user)
to the wallet.
The following example creates a credential with the user name rauser10 and the
password myPassword for the zdlra9 Recovery Appliance:
$ /u01/app/oracle/product/10.2.0/db_1/bin/mkstore -wrl
/u01/app/oracle/product/10.2.0/db_1/dbs/ra_wallet/ -createCredential
"zdlra9" "rauser10" "myPassword"
5. Ensure that the sqlnet.ora file contains the location of the Oracle wallet.
The following example shows how the entry should appear:
$ cat /u01/app/oracle/product/10.2.0/db_1/network/admin/sqlnet.ora
# sqlnet.ora Network Configuration File:
/u01/app/oracle/product/10.2.0/db_1/network/admin/sqlnet.ora
# Generated by Oracle configuration tools.
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
SQLNET.WALLET_OVERRIDE = true
WALLET_LOCATION =
(SOURCE =
(METHOD = FILE)
(METHOD_DATA =
(DIRECTORY = /u01/app/oracle/product/10.2.0/db_1/dbs/ra_wallet)
)
)
6. Copy the libra.so file from the ORACLE_HOME/lib directory of the Recovery
Appliance to the ORACLE_HOME/lib directory of the protected database.
4-18
Chapter 4
Configuring Backup and Recovery Settings for Protected Databases (Cloud Control)
See Also:
4-19
Chapter 4
Configuring Backup and Recovery Settings for Protected Databases (Cloud Control)
Note:
You can use Cloud Control to enroll protected databases with Oracle
Database 11g Release 2 (11.2) or later. For Oracle Database releases earlier
than 11.2, use the command line to configure backup and recovery settings.
4-20
Chapter 4
Configuring Backup and Recovery Settings for Protected Databases (Cloud Control)
See Also:
"About Real-Time Redo Transport"
• If you want to configure backup polling for the protected database, then specify the
polling location in the Disk Backup Location setting of the Disk Settings section.
Disk backups created to this location will then be automatically picked up by the
Recovery Appliance if the protected database is assigned to a protection policy that
specifies this location as a polling location. Polling policies are created by the
Recovery Appliance administrator.
4-21
Chapter 4
Configuring Backup and Recovery Settings for Protected Databases (Cloud Control)
See Also:
Note:
When backing up to Recovery Appliance, the initial full backup of the
protected database must contain all the tablespaces.
• In the Archived Redo Log Deletion Policy section, select one of the following
options to specify how RMAN must handle redo log file deletion for the local
backups stored on the protected database host:
– None
Archived redo logs in the fast recovery area are eligible for deletion if they
have been backed up at least once or if they are obsolete according to the
backup retention policy.
– Delete archived redo log files after they have been backed up the
specified number of times
Deletes archived redo log files that have been backed up the number of
times specified in the Backups field.
4-22
Chapter 4
Configuring Backup and Recovery Settings for Protected Databases (Cloud Control)
Note:
In the Retention Policy section, you need not specify any values. The settings in
the Retention Policy section are not used for backups to Recovery Appliance,
as the retention policy is inherited from the protection policy that is associated
with the protected database when it is enrolled with the Recovery Appliance.
See Also:
"Overview of Protected Database Backup Settings"
4-23
Chapter 4
Configuring Backup and Recovery Settings for Protected Databases (Cloud Control)
3. In the Instance Recovery section, specify the Desired Mean Time To Recover.
4. In the Media Recovery section, perform the following steps:
• (Optional) Select ARCHIVELOG Mode.
• (Optional) In the Log Archive Filename Format field, specify the format used
for archived redo log file names.
• In the Archived Redo Log Destination field, provide a destination to store
archived redo log files or specify USE_DB_RECOVERY_FILE_DEST to indicate that
the redo log files must be stored in the local fast recovery area.
If you selected Enable Real-Time Redo Transport in the Backup settings for
this protected database, then the archived redo log destination is automatically
set.
5. Configure a local fast recovery area for the protected database by specifying the
following in the Fast Recovery section:
• In the Fast Recovery Area Location field, specify the file-system or ASM
location where backup-related files are stored. Oracle recommends that you
configure a fast recovery area for the protected database. Local backups of
the protected database are stored in the fast recovery area.
• In the Fast Recovery Area Size field, specify the disk space quota allocated to
the fast recovery area. This is the maximum storage that can be used by the
4-24
Chapter 4
Configuring Backup and Recovery Settings for Protected Databases (Command Line)
recovery area for this protected database. Specifying a size is mandatory when you
configure a fast recovery area.
6. Click Apply to save the recovery settings.
See Also:
To clear the backup configuration for a protected database using Cloud Control:
1. Access the home page for the protected database as described in "Accessing the
Protected Database Home Page Using Cloud Control".
2. From the Availability menu, select Backup & Recovery, and then select Backup
Settings.
The Backup Settings page for the protected database is displayed as shown in
Figure 4-2.
3. In the Recovery Appliance Settings section, click Clear Configuration.
Note:
If real-time redo transport was configured for the protected database, then you
must manually force a redo log switch to maintain an accurate state for the
Redo Shipping column of this protected database in Cloud Control.
4-25
Chapter 4
Configuring Backup and Recovery Settings for Protected Databases (Command Line)
• Using RMAN Channels for Recovery Appliance Backup and Recovery Operations
To configure backup settings for a protected database using the command line:
1. Use RMAN to connect to the protected database as TARGET as described in
"Connecting to the Protected Database and Recovery Appliance Using CLI".
The following command starts RMAN and connects to the protected database as
target using operating system authentication:
% rman target /
See Also:
4-26
Chapter 4
Configuring Backup and Recovery Settings for Protected Databases (Command Line)
Note:
• The user you use for redo transport must be the same user you configured to
send backups to the Recovery Appliance.
• When you clear the real-time redo transport configuration for a protected
database, you must manually force a redo log switch to maintain an accurate
state for the protected database. The log switch forces the remote file server
process (RFS) to stop sending redo data to Recovery Appliance.
See Also:
Zero Data Loss Recovery Appliance Administrator's Guide for information about
creating the virtual private catalog account that is used by the Recovery
Appliance user
2. Ensure that the following conditions are met for the protected database:
• ARCHIVELOG mode is enabled
• DB_UNIQUE_NAME parameter is set
3. Ensure that the REMOTE_LOGIN_PASSWORDFILE and LOG_ARCHIVE_FORMAT initialization
parameters are set for the protected database:
REMOTE_LOGIN_PASSWORDFILE=exclusive
LOG_ARCHIVE_FORMAT='log_%d_%t_%s_%r.arc'
5. Set the LOG_ARCHIVE_CONFIG initialization parameter to include a DG_CONFIG list. Also set
the DB_UNIQUE_NAME for the protected database.
The following SQL commands, when connected to the protected database as a user with
SYSDBA privilege, set the DB_UNIQUE_NAME and LOG_ARCHIVE_CONFIG parameters for a
protected database whose db_unique_name is hr_ptdb and db_name is hr_ptdb:
4-27
Chapter 4
Configuring Backup and Recovery Settings for Protected Databases (Command Line)
See Also:
Oracle Data Guard Concepts and Administration for information about
setting a DG_CONFIG list
6. Configure an archived log destination that points to the redo staging area on the
Recovery Appliance.
You configure an archived log destination by setting one of the
LOG_ARCHIVE_DEST_n parameters, where n is any number between 1 and 31. You
must include the SERVICE attribute to specify where to store the redo data. Set this
attribute to the net service name of the Recovery Appliance database that stores
the redo stream from the protected database.
The following example configures the protected database to transport redo data
asynchronously to a Recovery Appliance whose net service name is boston.
ALTER SYSTEM SET LOG_ARCHIVE_DEST_3='SERVICE=boston
VALID_FOR=(ALL_LOGFILES, ALL_ROLES) ASYNC DB_UNIQUE_NAME=zdlra2' SCOPE=BOTH;
See Also:
Oracle Database Reference for information about setting the
LOG_ARCHIVE_DEST_n parameter
7. Enable logging for the archived redo log destination configured in Step 6 by setting
the LOG_ARCHIVE_DEST_STATE_n parameter, where n matches the value used for
the LOG_ARCHIVE_DEST_n parameter specified in Step 6.
The following command enables archived redo logging for the destination set
using the LOG_ARCHIVE_DEST_3 parameter:
ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_3='ENABLE' SCOPE=BOTH;
See Also:
Oracle Database Reference for information about setting the
LOG_ARCHIVE_DEST_STATE_n parameter
8. Set the redo transport user to the Recovery Appliance user that was created for
this protected database (see Step 1).
The following example sets the redo transport user to ravpc1:
ALTER SYSTEM SET REDO_TRANSPORT_USER=ravpc1 SCOPE=BOTH;
4-28
Chapter 4
Configuring Backup and Recovery Settings for Protected Databases (Command Line)
SHUTDOWN IMMEDIATE;
STARTUP;
If the protected database uses a parameter file instead of a server parameter file, then
add the parameters that were set in Steps 5 to 8 to the parameter file before you start up
the protected database.
See Also:
Note:
The sqlnet.ora file in the protected database must contain the location of the
Oracle wallet. Typically, the wallet location is automatically added to this file when
you install the Recovery Appliance backup module.
Note:
Databases that use Enterprise User Security (EUS) WALLET_ROOT format are not
supported for protected database configuration. Only WALLET_LOCATION is
supported.
In the case of multiple ZDLRAs, store a single wallet in a centralized location and have the
sqlnet.ora file on each ZDLRA reference that centralized wallet location.
If the wallet cannot be stored in a centralized location for multiple ZDLRAs, then it needs to
be copied to all instances. Create the wallet and master key on the first instance, and then
copy the wallet to the other instances. Further, set up the environment variable
ORACLE_UNQNAME to separate your database wallets. Then you can refer to them dynamically
from the sqlnet.ora as follows for Unix / Linux:
4-29
Chapter 4
Configuring Backup and Recovery Settings for Protected Databases (Command Line)
WALLET_LOCATION =
(SOURCE=(METHOD=FILE)
(METHOD_DATA =
(DIRECTORY=/etc/oracle/wallets/$ORACLE_UNQNAME/)))
Enter the password for the ravpc1 user when prompted. Here, zdlra01 is the net
service name of the Recovery Appliance database. The directory $ORACLE_HOME/
oracle/wallet must be created before the mkstore command is run.
Enter the password for ra_user when prompted. The directory $ORACLE_HOME/oracle/
wallet must be created before the mkstore command is run.
4-30
Chapter 4
Configuring Backup and Recovery Settings for Protected Databases (Command Line)
To configure recovery settings for a protected database using the command line:
1. Use RMAN to connect to the protected database as TARGET.
The following command starts RMAN and connects to the protected database as target
using operating system authentication:
% rman target /
2. Use the CONFIGURE command to configure the required recovery settings described in
"Overview of Protected Database Recovery Settings".
See Also:
Oracle Database Backup and Recovery User's Guide
See Also:
Example 4-3 configures an RMAN SBT channel for a Recovery Appliance. After this
configuration, you need not explicitly allocate SBT channels that correspond to the Recovery
Appliance backup module for each backup or recovery operation.
4-31
Chapter 4
Performing Test Backup and Recovery Operations
Example 4-4 allocates an RMAN SBT channel for the Recovery Appliance and then
creates a full backup of the protected database including archived redo logs.
Example 4-4 Allocating RMAN Channels for Recovery Appliance
This example allocates an RMAN SBT channel with the SBT_LIBRARY parameter
specifying the complete path of the Recovery Appliance backup module. The ENV
setting is used to specify the configuration parameters used by the Recovery
Appliance backup module. ra-scan is the SCAN of the Recovery Appliance and
zdlra5 is the service name of the Recovery Appliance metadata database.
RUN
{
ALLOCATE CHANNEL c1 DEVICE TYPE sbt_tape
PARMS='SBT_LIBRARY=/u01/app/oracle/product/12.1.0.2/dbhome_1/lib/libra.so,
ENV=(RA_WALLET=location=file:/u01/app/oracle/product/12.1.0.2/dbhome_1/dbs
credential_alias=ra-scan:1521/zdlra5:dedicated)' FORMAT '%U_%d';
BACKUP INCREMENTAL LEVEL 1 DATABASE PLUS ARCHIVELOG;
}
4-32
Chapter 4
Performing Test Backup and Recovery Operations
This BACKUP command creates a new level 0 backup, if one does not already exist, when
it is run for the first time.
Note:
Archive redo logs can be included with regular backups because the Recovery
Appliance keeps track of which logs may need to be backed up and avoids
backing up the same archived redo logs twice. The benefit of including archived
redo logs is in the case where there is a gap. Without archived redo logs, gap
detection may be delayed.
If these backup and recovery procedures succeed, then the client database is ready to
perform regular backups to the Recovery Appliance.
4-33
Chapter 4
Configuring Multiple Protected Databases to Send Backups to Recovery Appliance
4-34
Chapter 4
Configuring Multiple Protected Databases to Send Backups to Recovery Appliance
systems, the same emcli configure_db_ha command greatly simplifies this complex
maintenance task.
• Update EM Software Library with Latest Version of RMAN Recovery Appliance Backup
Module. This task is required for Scenario #2, and for some variants in Scenario #1.
• Scenario #1: Configure Multiple Protected Databases to Send Backups to Recovery
Appliance.
• Scenario #2: Update the RMAN Recovery Appliance Backup Module for Multiple
Protected Databases
These scenarios are independent. If EM handles the protected database management,
scenario #1 is performed one time for each protected database, followed by periodic
maintenance using variations of these scenarios.
Scenario #2 requires that the latest version of RMAN Recovery Appliance Backup module be
uploaded to the EM software library. This can be accomplished manually as needed, or in a
scheduled job.
4-35
Chapter 4
Configuring Multiple Protected Databases to Send Backups to Recovery Appliance
3. Specify a name for the library job. In this example, the name is "updateRA3".
4. On the Parameters tab and the pull-down for Backup Module Type, select
Recovery Appliance.
4-36
Chapter 4
Configuring Multiple Protected Databases to Send Backups to Recovery Appliance
5. On the Schedule tab, enter appropriate details for this job's schedule. The job is intended
to run on a repeating schedule (e.g., once a week) so that it can periodically check
Oracle Cloud for new backup module versions.
Later when this job is run at its scheduled time, it scans a designated location in the Oracle
Cloud that contains the latest version of the RMAN Recovery Appliance backup module for all
supported protected database platforms. It compares that version to the latest version
maintained in the EM software library. If the version found in Oracle Cloud is newer, that
version for all supported platforms is down-loaded into the software library. Older version of
RMAN backup are archived in the software library.
Protected databases that are managed by EM have their RMAN backup modules updated to
this new version with the emcli config_db_ha command.
Here is an example of the job output when a new backup module version is found and
downloaded to the Software Library.
4-37
Chapter 4
Configuring Multiple Protected Databases to Send Backups to Recovery Appliance
Single-instance Database
The following example of emcli configure_db_ha –configureRABackup configures
one single-instance database to send backups to and ship redo to a Recovery
Appliance.
4-38
Chapter 4
Configuring Multiple Protected Databases to Send Backups to Recovery Appliance
If the RMAN backup module is already installed in the database Oracle home, it does not
install the latest RMAN backup module from the software library. The command uses the EM
named database and host credentials.
emcli configure_db_ha –configureRABackup –ra_target_name="Chicago ZDLRA" –
ra_user="rauser1" –target_name="Finance" –target_type="oracle_database" –
db_cred="DB_USER" –db_host_cred="DB_HOST_USER" –enable_redo_ship
The content of the input file, /tmp/dblist, used by in this example specifies a single-instance
database and a cluster database
target.0.target_name=db1
target.0.target_type=oracle_database
target.1.target_name=rac1
target.1.target_type=rac_database
The –enable_redo_ship option is specified so that backups and redo logs are shipped to the
Recovery Appliance. If the RMAN backup module is already installed in the database Oracle
home, then it does not install the latest RMAN backup module from the software library. The -
4-39
Chapter 4
Configuring Multiple Protected Databases to Send Backups to Recovery Appliance
schedule option sets a future time for the operation. The command uses the same EM
named database and host credentials for all databases.
emcli configure_db_ha –configureRABackup –ra_target_name="Chicago ZDLRA" –
ra_user="rauser1" –input_file="/tmp/dblist" –db_cred="DB_USER" –
db_host_cred="DB_HOST_USER" –enable_redo_ship -
schedule="start_time:2016/06/28 18:31;tz:PST;"
4-40
Chapter 4
Configuring Multiple Protected Databases to Send Backups to Recovery Appliance
target.0.target_name=db1
target.0.target_type=oracle_database
target.0.db_cred=DB_SYS_CRED
target.0.db_host_cred=HOST__CRED1
target.1.target_name=rac1
target.1.target_type=rac_database
target.1.db_cred=DB_SYS_CRED2
target.1.db_host_cred=HOST_CRED2
Note the input file specifies different database and host named credentials for each database,
illustrating the flexibility offered by using an input file for multiple databases.
4-41
5
Backing Up Protected Databases
This chapter describes how to back up protected databases to Recovery Appliance.
This chapter contains the following topics:
• Overview of Backing Up Protected Databases
• Backing Up the Protected Database Using Cloud Control
• Backing Up the Protected Database Using the Command Line
• Monitoring Protected Database Backups Using Cloud Control
Note:
Starting in release 12.2.1.1.2-201910, you can backup a TDE encrypted database
to the Recovery Appliance. Using normal DBMS operations, you can select
tablespaces to be converted to TDE Tablespace Encryption. Afterwards, the
Recovery Appliance can provide an incremental forever strategy that covers both
an unencrypted recovery window and an encrypted recovery window. However, you
must follow the Oracle Database Advanced Security Guide to perform an explicit
incremental level 0 backup of the database after the tablespace has been
encrypted. This strategy increases the storage space needed, because encrypted
blocks cannot be compressed.
Multi-tenant databases can be backed up to Recovery Appliances from the container (CDB)
or the pluggable database (PDB), starting with release 19.2.1.1.1.202001.
5-1
Chapter 5
Backing Up the Protected Database Using Cloud Control
Note:
To preserve the CDB restore range, after a new PDB is plugged in and while
still in read-only mode, you must take a level 1 backup of either the CDB or
PDB. After the backup, the newly plugged in PDB can be made read-write.
Thereafter, normal level 1 backups can be taken of the CDB.
More information on Multitenant Database backup and recovery can be
found in Oracle Database Backup and Recovery User’s Guide.
Note:
If the protected database is running in NOARCHIVELOG mode, then you must
perform consistent backups which requires shutting down the protected
database.
See Also:
5-2
Chapter 5
Backing Up the Protected Database Using Cloud Control
3. From the Availability menu, select Backup & Recovery, and then Schedule Backup.
The Schedule Backup page is displayed as shown in Figure 5-1.
5-3
Chapter 5
Backing Up the Protected Database Using Cloud Control
A backup job is created based on the settings in the Schedule section. The
following message is displayed: The job has been successfully submitted.
11. Click View Job to display the status of the backup job.
The Summary section displays a job summary that includes the status, type of
backup, database name, Recovery Appliance catalog user name, and other
details.
Click Job Report to display a detailed report of the backup steps performed.
To backup the whole protected database along with archived redo logs:
1. Access the home page for the protected database as described in "Accessing the
Protected Database Home Page Using Cloud Control".
2. Ensure that the configuration steps described in "Enrolling the Protected Database
with Recovery Appliance (Cloud Control)" and "Configuring Backup and Recovery
Settings for Protected Databases (Cloud Control)" are completed.
3. From the Availability menu, select Backup & Recovery, and then Schedule
Backup.
The Schedule Backup page is displayed as shown in Figure 5-1.
4. In the Customized Backup section, select Schedule Customized Backup.
The Schedule Customized Backup: Options page is displayed.
5. In the Backup Type section, select Full Backup.
If you want to use this backup as the base of an incremental backup strategy, then
select Use as the base of an incremental backup strategy.
6. In the Backup Mode section, select Online Backup.
7. In the Advanced section, select Also back up all archived logs on disk to back
up the redo logs along with the protected database.
8. Click Next to display the Schedule Customized Backup: Settings page.
9. Select Recovery Appliance to store protected database backups on the
Recovery Appliance with which the protected database is enrolled.
10. Click Next to display the Schedule Customized Backup: Schedule page is
displayed.
11. (Optional) Edit the job name and description to provide user-defined names.
12. In the Schedule section, click Repeating and enter the following information:
5-4
Chapter 5
Backing Up the Protected Database Using the Command Line
The Summary section displays a job summary that includes the status, type of backup,
protected database name, Recovery Appliance catalog user name, and so on.
Click Job Report to display a detailed report of the backup steps performed.
See Also:
Oracle Database Backup and Recovery Reference for information about the
substitution variables
5-5
Chapter 5
Backing Up the Protected Database Using the Command Line
To create and schedule a level 1 incremental backup that includes archived redo
log files:
1. Ensure that the configuration steps described in "Enrolling the Protected Database
with Recovery Appliance (Command Line)" and "Configuring Backup and
Recovery Settings for Protected Databases (Command Line)" are completed.
5-6
Chapter 5
Backing Up the Protected Database Using the Command Line
2. Ensure that at least one RMAN SBT channel that corresponds to the Recovery Appliance
is configured as described in "Using RMAN Channels for Recovery Appliance Backup
and Recovery Operations".
3. Note:
The backup command in this sections applies when the ZDLRA is the only
backup destination. However, if implementing a dual backup strategy, follow
either:
• Implementing a Dual Backup Strategy with Backups to Disk and Recovery
Appliance (Doc ID 2154461.1)
• Implementing a Dual Backup Strategy with Backups to Tape and Recovery
Appliance (Doc ID 2154471.1)
Open a text editor and create and save a file with the following contents.
Save the file in a directory that is accessible to the Oracle Database software and on
which the Oracle software owner has the read permission. This script file is saved
as /u01/app/oracle/product/11.2.0.4/db_home1/db_incr_daily.sh. The CONNECT
CATALOG line below requires the appropriate password instead of myPassword.
export ORACLE_HOME=/u01/app/oracle/product/11.2.0.4/dbhome_1
export ORACLE_SID=db1124sm
export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin:$ORACLE_HOME/Opatch
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/rdbms/lib:/lib:/usr/lib;
export LD_LIBRARY_PATH
export LOG_TRACE_DIR=$HOME/RA_TEST/RMAN_SCRIPTS/LOG
dt=`date +%y%m%d%H%M%S`
$ORACLE_HOME/bin/rman log=$LOG_TRACE_DIR/rman_bkincr_log_db1124sm_$dt.log <<EOF
CONNECT TARGET /
CONNECT CATALOG rauser/myPassword@ra-scan:1521/zdlra5:dedicated
4. Log in to the protected database host as a user who is a member of the OSBACKUPDBA
operating system group.
See Also:
Oracle Database Administrator’s Guide for information about the OSBACKUPDBA
group
5. Open a text editor, create a file with the following contents, and save the file using the
name.crontab into your home directory. This example uses the crontab utility to
schedule the RMAN script.
[email protected]
# MI HH DD MM DAY CMD
00 1 * * * /u01/app/oracle/product/11.2.0.4/db_home1/db_incr_daily.sh
5-7
Chapter 5
Monitoring Protected Database Backups Using Cloud Control
6. In a command window, change directory to your home directory and enter the
following command to create a crontab file for this user from the contents
of .crontab.
# crontab .crontab
4. (Optional) Filter the list of backups in the report using the fields above each
column. You can filter by Backup Name, Status, Command, Type, Target, Start
Time, and Time Taken.
5. (Optional) The View Range control can help you select an appropriate time period
for the reports.
6. (Optional) The Recovery Window control displays the settings for the recovery
window as well as how many days it has protection.
5-8
Chapter 5
Monitoring Protected Database Backups Using Cloud Control
7. To view the details of any backup listed in the report, click on its row.
The bottom of the page displays a new area with three tabs of information about the
selected backup.
• End-to-End Summary
• Outputs
• Inputs
5-9
Chapter 5
Monitoring Protected Database Backups Using Cloud Control
Inputs
5-10
Chapter 5
Monitoring Protected Database Backups Using Cloud Control
For that particular backup report, the Inputs tab is divided into sections that provide
information about the datafile, the archive log, the control file, and information about the
container and tablespaces.
5-11
Chapter 5
Unprotecting Databases and Cleaning up
Figure 5-3 Job Activity Report for Protected Database Backup Jobs
5. To view the details of a particular job execution, select the job and click View
Results.
To stop the execution of a particular job, select the job and click Stop. Similarly,
you can use options to suspend, resume, or delete a job.
5-12
Chapter 5
Unprotecting Databases and Cleaning up
5-13
Chapter 5
Unprotecting Databases and Cleaning up
The output lists several configured options including something similar to the
following entry:
2. From the Enterprise Manager session looking at the same database, click on the
Clear Configuration button. In our example, the database name begins with
"cont001_".
The output lists no longer contains the entry for the SBT_TAPE channel device that was
used for theRecovery Appliance.
2. Issue the following API call with the name of yourDBname database.
5-14
Chapter 5
Unprotecting Databases and Cleaning up
wait=> FALSE);
The removal of backup data from the Recovery Appliance in the background can take
multiple days.
Meanwhile, yourDBname database is no longer allowed to backup to the Recovery Appliance.
5-15
6
Recovering Data from Recovery Appliance
This chapter explains how to use backups stored on Recovery Appliance to recover your
protected database after a failure.
This chapter contains the following sections:
• Overview of Restoring and Recovering Data from Recovery Appliance
• Recovering Protected Databases Using Cloud Control
• Restoring and Recovering Data from Recovery Appliance Using the Command Line
• Database Duplication from Recovery Appliance
See Also:
Oracle Database Backup and Recovery User's Guide for more information
about performing Oracle advised recovery
6-1
Chapter 6
Recovering Protected Databases Using Cloud Control
This technique performs manual recovery based on the specified criteria. You
must provide information such as the objects that must be recovered (database,
data files, tablespaces, archived redo logs), whether to perform complete recovery
or point-in-time recovery, location to which database files must be recovered, and
so on.
See Also:
Oracle Database Backup and Recovery User's Guide for more
information about performing user-directed recovery
6-2
Chapter 6
Recovering Protected Databases Using Cloud Control
The Perform Object Level Recovery: Corrupted Blocks page is displayed. The Datafile
Name section displays the data file name and the block IDs of the corrupt blocks.
8. Review the data file name and list of corrupt blocks and click Next.
The Perform Object Level Recovery: Schedule page is displayed. A default name and
description are entered for the recovery job.
9. If required, edit the name and description of the recovery job and click Next.
The Perform Object Level Recovery: Review page is displayed.
10. (Optional) View and edit the RMAN script generated for this recovery job by clicking Edit
RMAN Script.
11. Click Submit Job.
6-3
Chapter 6
Restoring and Recovering Data from Recovery Appliance Using the Command Line
See Also:
Oracle Database Backup and Recovery User's Guide for a complete
description of how to recover databases
6-4
Chapter 6
Restoring and Recovering Data from Recovery Appliance Using the Command Line
See Also:
See Also:
"Protected Databases and Recovery Appliance Architecture" for a brief overview of
replication
6-5
Chapter 6
Restoring and Recovering Data from Recovery Appliance Using the Command Line
Use the following high-level steps to restore a protected database directly from a
downstream Recovery Appliance:
1. Create an Oracle wallet that contains the credentials of the VPC user with which
the protected database will authenticate with the downstream Recovery Appliance.
See Also:
"Creating an Oracle Wallet on the Protected Database"
Note:
The protected database need not be explicitly added to or registered with
the downstream Recovery Appliance before performing restore
operations. When replication is configured between the upstream and
downstream Recovery Appliance, the protected databases enrolled with
the upstream Recovery Appliance are registered with the downstream
Recovery Appliance.
See Also:
"Connecting to the Protected Database and Recovery Appliance Using
CLI"
See Also:
"Allocating RMAN SBT Channels for Recovery Appliance"
6-6
Chapter 6
Restoring and Recovering Data from Recovery Appliance Using the Command Line
See Also:
"Connecting to the Protected Database and Recovery Appliance Using CLI"
3. Restore and recover all the data files using the following command:
STARTUP MOUNT;
RUN
{
RESTORE DATABASE;
RECOVER DATABASE;
ALTER DATABASE OPEN;
}
See Also:
To restore and recover the entire protected database, including the control file, to a
specific point-in-time:
1. Ensure that the prerequisites described in "Prerequisites for Restoring and Recovering
Data from Recovery Appliance" are met.
2. Use RMAN to connect to the protected database as TARGET and the Recovery Appliance
catalog as CATALOG.
6-7
Chapter 6
Restoring and Recovering Data from Recovery Appliance Using the Command Line
See Also:
"Connecting to the Protected Database and Recovery Appliance Using
CLI"
If the protected database is not available, you can query the Recovery Appliance
catalog views to obtain the SCN number. You must provide the range date and
time for your recovery window and the db_unique_name of the protected database.
The following query (sample output included) is run when connected to the
Recovery Appliance catalog:
SELECT a.db_key,
a.db_name,
a.sequence#,
a.first_change#,
a.next_change#,
a.completion_time
FROM rc_archived_log a, db b
WHERE b.reg_db_unique_name = 'PTDB2' AND a.db_key = db.db_key
AND to_date('16-Jul-2014 06:55:23','DD-Mon-YYYY HH24:MI:SS')
BETWEEN
a.first_time AND a.next_time;
The FIRST_CHANGE# corresponds to the first SCN number in the archive redo log
and the NEXT_CHANGE# is the last SCN number in the archive redo log.
4. Restore and recover the control file and the protected database.
STARTUP NOMOUNT;
RUN
{
SET UNTIL TIME "TO_DATE('2014-14-07:17:27:49','yyyy-dd-mm:hh24:mi:ss')";
RESTORE CONTROLFILE;
ALTER DATABASE MOUNT;
RESTORE DATABASE;
RECOVER DATABASE;
ALTER DATABASE OPEN RESETLOGS;
}
6-8
Chapter 6
Restoring and Recovering Data from Recovery Appliance Using the Command Line
See Also:
"Connecting to the Protected Database and Recovery Appliance Using CLI"
3. Restore the control file and then mount the database using the following command:
STARTUP NOMOUNT;
RUN
{
RESTORE CONTROLFILE;
ALTER DATABASE MOUNT;
}
See Also:
"Connecting to the Protected Database and Recovery Appliance Using CLI"
6-9
Chapter 6
Restoring and Recovering Data from Recovery Appliance Using the Command Line
See Also:
"Connecting to the Protected Database and Recovery Appliance Using
CLI"
3. Restore and recover the affected data file in the protected database using the
following command:
The following command restores and recovers data file 3 in the protected
database:
RUN
{
SQL 'ALTER DATABASE DATAFILE 3 OFFLINE';
RESTORE DATAFILE 3;
RECOVER DATAFILE 3;
SQL 'ALTER DATABASE DATAFILE 3 ONLINE';
}
6-10
Chapter 6
Restoring and Recovering Data from Recovery Appliance Using the Command Line
See Also:
"Connecting to the Protected Database and Recovery Appliance Using CLI"
3. Identify the PDB that needs to be restored by running the following query in the CDB:
SELECT name FROM v$pdbs;
6-11
Chapter 6
Restoring and Recovering Data from Recovery Appliance Using the Command Line
4. Restore and recover the affected PDB to the specified point in time.
The following command restores and recovers the PDB hr_pdb to the point in time
specified by the SET UNTIL clause.
RUN
{
SET UNTIL TIME "to_date('2014-08-16 09:00:00','YYYY-MM-DD HH24:MI:SS')";
ALTER PLUGGABLE DATABASE "hr_pdb" CLOSE IMMEDIATE;
RESTORE PLUGGABE DATABASE 'hr_pdb';
RECOVER PLUGGABLE DATABASE 'hr_pdb';
ALTER PLUGGABLE DATABASE hr_pdb OPEN RESETLOGS;
}
4. Identify the number of the data file in the PDB that needs to be recovered using
the following query:
SELECT p.PDB_ID, p.PDB_NAME, d.FILE_ID, d.TABLESPACE_NAME, d.FILE_NAME
FROM DBA_PDBS p, CDB_DATA_FILES d
WHERE p.PDB_ID = d.CON_ID
ORDER BY p.PDB_ID;
6-12
Chapter 6
Restoring and Recovering Data from Recovery Appliance Using the Command Line
Restoring and recovering a tablespace in a PDB is similar to a normal tablespace restore and
recovery. The difference is that you need to map the tablespace to the pluggable database
(pdb_name:tablespace_name).
4. Restore and recover the affected tablespaces contained in the PDB within your protected
database.
The following example restore and recovers the tablespace usr_tbs in the PDB sh_pdb.
RUN
{
RESTORE TABLESPACE sh_pdb:usr_tbs;
RECOVER TABLESPACE sh_pdb:usr_tbs;
}
6-13
Chapter 6
Restoring and Recovering Data from Recovery Appliance Using the Command Line
See Also:
Oracle Database Backup and Recovery User's Guide
The existence of corrupt data blocks can be indicated by one of the following methods:
• The protected database alert log contains the following message indicating that
one or more blocks are corrupt:
Sun Aug 17 09:34:48 2014
Hex dump of (file 2, block 16385) in trace file /u01/app/oracle/diag/rdbms/
dbstress/dbstress/trace/dbstress_ora_9732.trc
• During an RMAN backup, the block corruption is detected and a message similar
to the following will be displayed.
RMAN-08038: channel c3: starting piece 1 at 2014/08/17 09:34:43
RMAN-03009: failure of backup command on c1 channel at 08/17/2014 09:34:50
ORA-19566: exceeded limit of 0 corrupt blocks for file /SHARED1/ORADATA/DBF/
dbstress/soe.dbf
.
.
RMAN-03002: failure of backup plus archivelog command at 08/17/2014 09:35:55
RMAN-03009: failure of backup command on c1 channel at 08/17/2014 09:34:50
ORA-19566: exceeded limit of 0 corrupt blocks for file /SHARED1/ORADATA/DBF/
dbstress/soe.dbf
6-14
Chapter 6
Restoring and Recovering Data from Recovery Appliance Using the Command Line
2. Use RMAN to connect to the protected database as TARGET and the Recovery Appliance
catalog as CATALOG as described in "Connecting to the Protected Database and Recovery
Appliance Using CLI".
3. Identify the corrupt blocks that need to be recovered.
Use the entries in the protected database alert log to identify corrupt blocks and the data
files that contain these corrupt blocks. Or, query the V$DATABASE_BLOCK_CORRUPTION view
to identify corrupt blocks.
4. Use the BLOCKRECOVER command to recover the corrupt data blocks.
The following example recovers the data blocks 46, 56, and 84 in data file 4.
RUN
{
BLOCKRECOVER CORRUPTION LIST;
BLOCKRECOVER DATAFILE 4 BLOCK 46,56,84;
}
Note:
In the following scenarios, RC_DATABASE.FINAL_CHANGE# will contain the value -1
and cannot be used in the SET UNTIL SCN command:
6-15
Chapter 6
Restoring and Recovering Data from Recovery Appliance Using the Command Line
Note:
The UNTIL SCN clause is required. Unless a specific SCN value is
chosen, the log containing the partial redo is not applied by recovery.
See Also:
6-16
Chapter 6
Database Duplication from Recovery Appliance
To restore and recover a protected database, including the control file, that is
configured to use real-time redo transport:
1. Ensure that the prerequisites described in "Prerequisites for Restoring and Recovering
Data from Recovery Appliance" are met.
2. Use RMAN to connect to the protected database as TARGET and the Recovery Appliance
catalog as CATALOG as described in "Connecting to the Protected Database and Recovery
Appliance Using CLI".
3. Determine the SCN to which the protected database must be recovered by querying the
RC_DATABASE view. This SCN is the highest SCN at the time the database crashed.
SELECT final_change# FROM rc_database WHERE name='PTDB1';
Note:
DUPLICATE is the recommended method to create a clone database for standby
database, development, or testing purposes, because a new DBID is created for the
clone database.
If the protected database must be restored to a new host following the RMAN restore
and recover to a new host procedure that keeps the same DBID, you must
disconnect from the catalog before performing OPEN RESETLOGS or use SQL Plus to
open the database.
6-17
Chapter 6
Database Duplication from Recovery Appliance
See Also:
Note:
Because the primary database is already registered with the Recovery
Appliance catalog, you should not register the standby database with the
Recovery Appliance catalog.
3. Create the standby database using the DUPLICATE command. Configure one or
more auxiliary channels that correspond to the Recovery Appliance backup
module.
6-18
Chapter 6
Database Duplication from Recovery Appliance
The following example configures three auxiliary channels and creates a standby
database for the protected database my_ptdb .
RUN
{
ALLOCATE AUXILIARY CHANNEL c1 DEVICE TYPE sbt_tape
PARMS='SBT_LIBRARY=/u01/oracle/product/12.1.0.2/dbhome_1/lib/libra.so,
ENV=(RA_WALLET=location=file:/u01/oracle/product/12.1.0.2/dbhome_1/dbs/ra
credential_alias=ra-scan:1521/zdlra5:dedicated)' FORMAT'%U_%d';
ALLOCATE AUXILIARY CHANNEL c2 DEVICE TYPE sbt_tape
PARMS='SBT_LIBRARY=/u01/oracle/product/12.1.0.2/dbhome_1/lib/libra.so,
ENV=(RA_WALLET=location=file:/u01/oracle/product/12.1.0.2/dbhome_1/dbs/ra
credential_alias=ra-scan:1521/zdlra5:dedicated)' FORMAT'%U_%d';
ALLOCATE AUXILIARY CHANNEL c3 DEVICE TYPE sbt_tape
PARMS='SBT_LIBRARY=/u01/oracle/product/12.1.0.2/dbhome_1/lib/libra.so,
ENV=(RA_WALLET=location=file:/u01/oracle/product/12.1.0.2/dbhome_1/dbs/ra
credential_alias=ra-scan:1521/zdlra5:dedicated)' FORMAT'%U_%d';
DUPLICATE DATABASE my_ptdb FOR STANDBY DORECOVER;
}
6-19
Chapter 6
Database Duplication from Recovery Appliance
*.db_name = 'dup_db'
2. Use a text editor and create a Shell script (called dup_db.sh in this example) with
the contents shown below and with the following modifications:
• Replace the value of the ORACLE_HOME variable with the Oracle home directory
of your auxiliary instance.
• Replace the value of the logdir variable with the directory in which you want
to store log files.
• Replace the following placeholders (shown in Italics) with values appropriate
to your duplication scenario:
dup_db: system identifier (SID) and service name of the auxiliary instance
tgt_db: SID and service name of the target database
sys_pswd: password for the SYS user of the target database
vpc_user: name of the VPC user
vpc_user_pswd: password for the VPC user vpc_user
ra_scan: Single Client Access Name (SCAN) of the Recovery Appliance
ra_servicename: service name of the Recovery Appliance metadata database
system_pswd: password for the SYSTEM user in the target database
• If you want to store the duplicate database control file using a name and
location that is different from +REDO/ORACLE_SID/CONTROLFILE/cf3.ctl, then
replace the value of control_files in the dup_aux_db function with a value
that is appropriate for your duplication scenario.
• If you want to store the duplicate data files in a directory that is different from
+DATA, then replace the value of db_create_file_dest in the dup_aux_db
function with a value that is appropriate for your duplication scenario.
#!/bin/bash
export ORACLE_HOME=/u01/app/oracle/product/11.2.0.4/dbhome_2
export ORACLE_BASE=/uo1/app/oracle
export ORACLE_SID=dup_db
export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin:$ORACLE_HOME/Opatch
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/rdbms/lib:/
lib:/usr/lib;
export LD_LIBRARY_PATH
export logdir=/home/oracle/log
export dt='date +%y%m%d%H%M%S'
export NLS_DATE_FORMAT='DD-MM-YYYY HH24:MI:SS'
6-20
Chapter 6
Database Duplication from Recovery Appliance
function drop_aux_db {
export ORACLE_SID=dup_db
$ORACLE_HOME/bin/sqlplus -s '/ as sysdba' <<EOF2
set pagesize 999 linesize 999 heading off feedback off
select name, open_mode from v\$database;
shutdown immediate;
startup mount exclusive restrict;
drop database;
exit;
EOF2
}
sleep 120
6-21
Chapter 6
Database Duplication from Recovery Appliance
drop_aux_db
backup_source_db
check_source_db_backup
nomount_aux_db
dup_aux_db
check_source_db
check_aux_db
3. Set execute permissions on the script dup_db.sh using the chmod command.
$ chmod +x dup_db.sh
4. On the duplicate host (that hosts the duplicate database), run the dup_db.sh
script.
The following command runs the dup_db.sh script that is stored in the /home/
my_scripts/duplication directory:
$ ./home/my_scripts/duplication/dup_db.sh
6-22
A
Unsupported RMAN Commands
This appendix describes changes and limitations to standard RMAN commands when using
Recovery Appliance.
Note:
You can also store archived redo log
backups to any disk directory when using a
parallel backup strategy.
A-1
Appendix A
Note:
See Zero Data Loss Recovery Appliance
Administrator's Guide for information about
the DELETE_DB procedure.
Note:
If you want to upgrade the Recovery
Appliance software, refer to this Oracle
Support Note: Zero Data Loss Recovery
Appliance Upgrade and Patching (Doc ID
2028931.1)
A-2
Index
A configuring (continued)
protected databases
administration tasks high-level steps, 4-2
protected databases, 1-5 overview, 4-1
real-time redo transport
using Enterprise Manager, 4-11
B using RMAN, 4-26
backing up creating
incremental-forever backup strategy, 5-5 clone databases from Recovery Appliance,
Oracle-suggested backup strategy, 5-2 6-19
using Enterprise Manager, 5-4 Enterprise Manager administrator, 4-8
using RMAN, 5-5 standby databases from Recovery Appliance,
backup pieces 6-18
recovery protection off, 5-13 test backup
remove from recovery appliance, 5-14 using Enterprise Manager, 4-34
backup polling, 1-8 using RMAN, 4-32
backup reports
end-to-end summary, 5-9 D
for protected databases, 5-8–5-10
inputs, 5-10 Data Security, 3-1
outputs, 5-10 disable
backup settings delta backup pieces, 5-13
about, 4-6
using Enterprise Manager, 4-20
using RMAN, 4-26
E
block media recovery emcli
using Enterprise Manager, 6-2, 6-3 configure_db_ha, 4-38–4-41
encryption
C HTTPS, 3-1
end-to-end summary
clean up backup reports, 5-9
recovery protection off, 5-12 enrolling protected databases
clone databases about, 4-5
from Recovery Appliance, 6-19 using Enterprise Manager, 4-8, 4-9
cluster database using RMAN, 4-11, 4-14
send backups and redo, 4-39, 4-41 Virtual Private Catalogs, 4-12
configuration parameters Enterprise Manager
for Recovery Appliance backup module, 4-3 accessing protected database home page,
configuring 4-13
protected database backup settings Backup Settings, 4-12
using Enterprise Manager, 4-20 multiple protected databases, 4-34, 4-38,
using RMAN, 4-26 4-40
protected database recovery settings RMAN Recovery Appliance Backup Module,
using Enterprise Manager, 4-23 4-35, 4-38, 4-40
using RMAN, 4-30 Virtual Private Catalogs, 4-12
Index-1
Index
Index-2
Index
Index-3