How to Create The RMAN Recovery Catalog

What is the RMAN Catalog Schema, Repository and Database?

The RMAN catalog schema is an Oracle Schema holding the RMAN repository. It is made up of a set of tables, views, and pl/sql programs used by RMAN. These objects together form the RMAN catalog or repository. An RMAN catalog database is an Oracle database that the RMAN catalog schema resides in.

The RMAN repository has its own version and can be entirely different from database’s version. For example, this RMAN catalog database is running on 11.2.0.3, but the RMAN catalog version is 10.2.0.5:

$ . oraenv
ORACLE_SID = [ORA112] ? RCAT

$ sqlplus
SQL*Plus: Release 11.2.0.3.0 Production on Wed Apr 18 09:31:10 2012
Copyright (c) 1982, 2011, Oracle.  All rights reserved.
Enter user-name: [rman_user]/[password]

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select * from rcver;

VERSION
------------
10.02.00.05

Why Do You Need a Recovery Catalog?

An RMAN recovery catalog is a database schema for RMAN backup metadata. You can certainly take a backup and perform a restore without a recovery catalog. However, there are specific operations that are only possible with a recovery catalog. These include stored scripts, long retention periods, and archival backups.

In general, we highly recommend the use of a recovery catalog. The exceptions to these are when you need to perform a test restore of a database; or when there appears to be an issue with the recovery catalog itself.

5. How Do You Create The Recovery Catalog?

In this example, we are using the RCAT database, and RMAN schema to host the RMAN catalog.

1. Login to SQL*Plus as the DBA user and create the RMAN catalog schema:

SQL> create user [rman_user]identified by [password] default tablespace users quota unlimited on users;

2. 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_user];
  1. Login to RMAN as the catalog schema, and create the catalog:
$ . oraenv
RCAT

$ rman catalog [rman_user]/[password]@[catalog_tns]

RMAN> create catalog;

4. now register the target:

$ . oraenv
ORA112

$ rman target / catalog [rman_user]/[password]@[catalog_tns]

RMAN> register database;