Creating a Recovery Catalog

posted Sep 9, 2010, 12:48 PM by Sachchida Ojha
Recovery catalog is a schema stored in a database that tracks backups and stores scripts for use in RMAN backup and recovery situations. Steps to create a recovery catalog in RMAN database. RMAN database is an instance created on same or different machine.

The RMAN schema owner is created in the RMAN database using the following steps:

SQL> CONNECT SYS/passwd@rmandb AS SYSDBA

SQL> CREATE USER rman IDENTIFIED BY rman TEMPORARY TABLESPACE temp DEFAULT TABLESPACE tools QUOTA UNLIMITED ON tools;

SQL> GRANT RECOVERY_CATALOG_OWNER TO rman;

Once the owner user is created, the RMAN recovery catalog schema can be added:

Connect to the database that contains the catalog owner.

$rman CATALOG rman/rman@rmandb

The use of the CATALOG keyword tells Oracle this database contains the repository

OR
$rman

RMAN>CONNECT CATALOG rman/rman@rmandb

RMAN>CREATE CATALOG;

While the RMAN catalog can be created and used from either a 9i or 10g database, the Enterprise Manager Grid Control database must be a 9i database. 
This is true at least for release 1, although this may change with future releases.

Each database that the catalog will track must be registered.

Registering a Database with RMAN

The following process can be used to register a database with RMAN:

1. Make sure the recovery catalog database is open.
2. Connect RMAN to both the target database and recovery catalog database.
For example, with a catalog database of RMANDB and user RMAN, owner of the catalog schema, and the target database, TEST1,
which is the database to be backed up, database user SYS would issue:

% rman TARGET sys/oracle@test1 CATALOG rman/rman@rmandb

3. Once connected, if the target database is not mounted, it should be opened or mounted:

RMAN> STARTUP;

--or--

RMAN> STARTUP MOUNT;

4. If this target database has not been registered, it should be registered it in the connected recovery catalog:

RMAN> REGISTER DATABASE;

The database can now be operated on using the RMAN utility.

Comments