Creating an RMAN Recovery Catalog

The RMAN Recovery Catalog is a database schema that holds the metadata detailing the RMAN backup operations performed on the target database. The metadata include the following information from about the target database: database structure, RMAN configuration, data file and archive log backups (backup sets, pieces and copies), archived redo logs and their copies. In addition to the metadata the recovery catalog can also store scripts that can be used by all registered target databases.

This document will detail the steps to create an RMAN recovery catalog using Oracle Database 11gR2 on Oracle Enterprise Linux. The process is the same for other versions of UNIX and Windows.

It is recommended that the recovery catalog be in a database separate from any of the target databases. Many organizations store the recovery catalog in the same database as their Enterprise Manager Grid Control repository. It is also recommended that the database that houses the recovery catalog to be in ARCHIVELOG mode.

First create a table space to house the recovery catalog schema.

SQL> create tablespace rec_catalog11g
  2  datafile '/u02/app/oracle/oradata/orcl/rec_catalog11g1.dbf'
  3  size 10M autoextend on
  4  extent management local uniform size 1M

Tablespace created.

SQL>

Next we create the recovery catalog owner. The user SYS cannot be the owner of the recovery catalog.

SQL> create user rcat identified by password
  2  default tablespace rec_catalog11g
  3  quota unlimited on rec_catalog11g;

User created.

SQL> grant recovery_catalog_owner to rcat;

Grant succeeded.

SQL> 

The role RECOVERY_CATALOG_OWNER has all of the privileges need to query and maintain the recovery catalog.

 SQL> select privilege from dba_sys_privs where grantee = 'RECOVERY_CATALOG_OWNER';

PRIVILEGE
----------------------------------------
CREATE SYNONYM
CREATE CLUSTER
ALTER SESSION
CREATE DATABASE LINK
CREATE PROCEDURE
CREATE SEQUENCE
CREATE TABLE
CREATE SESSION
CREATE TYPE
CREATE VIEW
CREATE TRIGGER

11 rows selected.

SQL> 

The actual creation of the recovery catalog is performed in RMAN while connected to the database in which the catalog is to be created. The command CREATE CATALOG will create the recovery catalog in the default table space of the user. If you need to store the catalog in a table space other than the users default table space you can provide the table space name using TABLESPACE.

[oracle@ora1 ~]$ rman target / catalog rcat@orcl

Recovery Manager: Release 11.2.0.1.0 - Production on Thu Aug 26 11:53:37 2010

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

connected to target database: ORCL (DBID=1239150297)
recovery catalog database Password: 
connected to recovery catalog database

RMAN> create catalog tablespace rec_catalog11g;

recovery catalog created

RMAN> 

1 thought on “Creating an RMAN Recovery Catalog”

  1. There is an step missing.

    Once you connect to the new database to be backed up, you have to register it on the rman catalog you just created:

    RMAN> register database;

    Otherwise you will get:

    RMAN-06004: ORACLE error from recovery catalog database: RMAN-20001: target database not found in recovery catalog

    Regards…

Leave a Reply

Your email address will not be published. Required fields are marked *