What is the RMAN recovery catalog:
RMAN recovery catalog, which holds RMAN repository data for one or more databases in a separate database schema, in addition to using the control files of the databases.
RMAN>Configure backup optimization on;
This command will make the read-only datafiles will not be backedup as long as backups of those files already exist and those backups meet eshtablished retention criteria.
RMAN recovery catalog, which holds RMAN repository data for one or more databases in a separate database schema, in addition to using the control files of the databases.
Creating a Recovery Catalog
Creating a recovery catalog is a three-step process: you
must configure the database that will contain the recovery catalog,
create the recovery catalog owner, and then create the recovery catalog
itself.
Configuring the Recovery Catalog Database
When you use a recovery catalog, RMAN requires that you
maintain a recovery catalog schema. The recovery catalog is stored in
the default tablespace of the schema. Note that
SYS
cannot be the owner of the recovery catalog.
Decide which database you will use to install the recovery
catalog schema, and also how you will back up this database. You should
not install the catalog in the target database: this tactic defeats the
purpose of the catalog. Also, decide whether to operate the catalog
database in
ARCHIVELOG
mode, which is recommended.Planning the Size of the Recovery Catalog Schema
You must allocate space to be used by the catalog schema.
The size of the recovery catalog schema depends upon the number of
databases monitored by the catalog, and the number and size of RMAN
scripts stored in the catalog. The schema also grows as the number of
archived redo log files and backups for each database grows.
For an example, assume that the
trgt
database
has 100 files, and you back up the database once a day, producing 50
backup sets containing 1 backup piece each. If you assume that each row
in the backup piece table uses the maximum amount of space, then one
daily backup will consume less than 170 KB in the recovery catalog. So,
if you back up once a day for a year, then the total storage in this
period is about 62 MB. Assume approximately the same amount for archived
logs. Hence, the worst case is about 120 MB for a year for metadata
storage.
For a more typical case in which only a portion of the
backup piece row space is used, 15 MB for each year is a realistic
estimate.
If you plan to register multiple databases in your
recovery catalog, remember to add up the space required for each one
based on the previous calculation to arrive at a total size for the
default tablespace of the recovery catalog schema.
Allocating Disk Space for the Recovery Catalog Database
If you are creating your recovery catalog in an
already-existing database, add enough room to hold the default
tablespace to the recovery catalog schema. If you are creating a new
database to hold your recovery catalog, then, in addition to the space
for the recovery catalog schema itself, you must allow space for other
files in the recovery catalog database:
This table describes the typical space required:
Please be careful to ensure that the recovery catalog and target databases do not
reside on the same disk. If a disk containing both your recovery
catalog and your target databases failed, your recovery process would be
much more complicated. If possible, take other measures as well to
eliminate common points of failure between your recovery catalog
database and the databases you are backing up.
Creating the Recovery Catalog Owner
After choosing the recovery catalog database and creating
necessary space, you are ready to create the owner of the recovery
catalog and grant this user necessary privileges.
Assume the following background information for the instructions in the following sections:
- User
SYS
with passwordoracle
hasSYSDBA
privileges on the recovery catalog databasecatdb
. - A tablespace called
tools
in the recovery catalog databasecatdb
stores the recovery catalog. Note that to use an RMAN reserved word as a tablespace name, you must enclose it in quotes and put it in uppercase. (Refer to Oracle Database Recovery Manager Reference for a list of RMAN reserved words.) - A tablespace called
temp
exists in the recovery catalog database. - The database is configured in the same way as all normal databases, for example,
catalog.sql
andcatproc.sql
have successfully run.
To create the recovery catalog schema in the recovery catalog database:
- Start SQL*Plus
and then connect with administrator privileges to the database
containing the recovery catalog. For example, enter:
CONNECT SYS/oracle@catdb AS SYSDBA
- Create a user and schema for the recovery catalog. For example, enter:
CREATE USER rman IDENTIFIED BY cat TEMPORARY TABLESPACE temp DEFAULT TABLESPACE tools QUOTA UNLIMITED ON tools;
- Grant the
RECOVERY_CATALOG_OWNER
role to the schema owner. This role provides the user with all privileges required to maintain and query the recovery catalog.SQL> GRANT RECOVERY_CATALOG_OWNER TO rman;
RMAN>Configure backup optimization on;
This command will make the read-only datafiles will not be backedup as long as backups of those files already exist and those backups meet eshtablished retention criteria.