RMAN Recovery Catalog

RMAN recovery catalog is used to store metadata of the backup & recovery and for storing RMAN scripts. Metadata could be also stored in the control file of the database, but when the database crashes, than it is better to have all the metadata about the backup in the other database that has not crashed. Metadata about the backup & recovery is also stored in the control file of the DB. Recovery Catalog can be used to store metadata from more databases. It also has much longer and richer reporting. It is advisable to keep recovery catalog schema in a separate DB from the production DBs.

Creating Recovery Catalog

– Create a new database with DBCA preferably named RMANCAT, CATDB … (or not advised, just new tablespace in an existing DB);

– Create a user which will be owner of the recovery catalog;

c:\> sqlplus / as sysdba
SQL> create user rmanuser identified by rmanuser;

– Grant necessary roles, priviledges to user

SQL> grant recovery_catalog_owner to rmanuser;
SQL> grant connect, resource to rmanuser;

– Create Recovery Catalog

c:\> rman catalog rmanuser/rmanuser@RMANCAT
RMAN> create catalog;

– Register the databases which will use this database (RMANCAT) as recovery catalog

$rman target / catalog rmanuser/rmanuser@RMANCAT
RMAN> register database;

– Verify that the registration was successful by running REPORT SCHEMA

RMAN> report schema;

Maintaining the Recovery Catalog

– RC should also be regularly backed up

– synchronization with the control file. SCN should be matching between those two. This should be happening automatically, but in case there was some error, one can do it manually with the following command:

RMAN> resync catalog;


c:\> sqlplus / as sysdba

SQL> connect rman/rman@orcle

This 4 views that can be accessed through SQL*PLUS are giving a lot of reporting information about RC. (SQL> select * view_name;)
– rc_stored_script – what the scripts are, that are contained in the RC
– rc_rman_status – general status information,
– rc_rman_configuration – giving you persistent configuration information,
– rc_database – all metadata from the registered databases

Virtual Private Catalog

It is used in situations when we have more DB Administrators and we do not want to let some administrator see all the data, so virtual catalog is made of only the part of the DB that this DBA is allowed to see and only that part of catalog is given to him, to work on.

It is done in the following procedure:
0. make a default tablespace for the user

SQL> create tablespace r1ts
2 datafile 'd:\recovery\r1ts_01.dbf' size 500M;

1. create delegated user in rcdb

SQL> create user r1 identified by r1
2 temporary tablespace temp
3 default tablespace r1ts
4 quota unlimited on r1ts;

2. grant recovery_catalog_owner right to that user

SQL> grant recovery_catalog_owner to r1;

3. grant catalog (in RMAN) for specified db to user

SQL> exit
d:\> rman catalog rman/rman@orcl
RMAN> grant catalog for database orcl to r1;

4. create virtual catalog

RMAN> exit

d:\> rman catalog r1/r1@orcl
RMAN> create virtual catalog;


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: