##############
RMAN CATALOG
##############
The recovery catalog contains information about RMAN operations, including:
+ Datafile and archived redo log backup sets and backup pieces
+ Datafile copies
+ Archived redo logs and their copies
+ Tablespaces and datafiles on the target database
+ Stored scripts, which are named user-created sequences of RMAN commands
+ Persistent RMAN configuration settings
Creating recovery catalog is a 3 step process .The recovery catalog is stored in the default tablespace of the
recovery catalog schema. SYS cannot be the owner of the recovery catalog.
1. Creating the Recovery Catalog Owner
======================================
% sqlplus ‘/ as sysdba’
SQL> CREATE USER rman IDENTIFIED BY rman
DEFAULT TABLESPACE tools
TEMPORARY TABLESPACE temp
QUOTA UNLIMITED ON tools;
SQL> GRANT CONNECT, RECOVERY_CATALOG_OWNER TO rman;
2. Creating the Recovery Catalog
================================
Before creating the recovery catalog make sure to have the tnsnames.ora entry for the catalog database in
the target server and the listener must be up and running in the catalog database server.You must be able
to connect to the catalog database from sqlplus from the target server.
% rman catalog rman/rman @ catadb
RMAN> CREATE CATALOG;
3. Registering the target database
==================================
After making sure the recovery catalog database is open, connect RMAN to the target database and recovery
catalog database and register the database . Make sure that your target database is either open or in Mount
stage.
% rman TARGET / CATALOG rman/rman @ catdb
RMAN> REGISTER DATABASE;
RMAN creates rows in the catalog tables to contain information about the catalog database. Copy all the
pertinent data from the controlfile into the catalog, synchronizing the catalog with the control file. You can
register multiple target databases in a single recovery catalog, if they do not have duplicate DBIDs. RMAN
uses the DBID to distinguish one database from another.
How to Upgrade recovery catalog Schema ?
========================================
When you upgrade target database to the latest version you need to upgrade the RMAN catalog
schema.Connect to RMAN from the target database so that you can use, the target database’s RMAN
executable. Look at the example :
% rman target / catalog rman/rman @ catdb
RMAN> UPGRADE CATALOG;
RMAN-06435: recovery catalog owner is rman
RMAN-06442: enter UPGRADE CATALOG command again to confirm catalog upgrade
RMAN> UPGRADE CATALOG;
Issuing ‘upgrade catalog’ will only upgrade the catalog schema to be compatible with the higher release of
RMAN; it will not upgrade the catalog database in any way. You have to connect to recovery catalog
database catdb and run “upgrade catalog” twice.
How to remove catalog ?
=======================
The “drop catalog;” command to remove an RMAN catalog. These commands need to be entered twice to
confirm the operation. Look at the example
RMAN> DROP CATALOG;
How to unregister the target database from the recovery catalog ?
=================================================================
In 10g:
RMAN> UNREGISTER DATABASE
Prior 10g;
% sqlplus rman/rman @catdb
SQL > select name, db_key, dbid from rc_database;
SQL > DBMS_RCVCAT.UNREGISTERDATABASE(db_key, db_id);
How to identify recovery catalog schema version ?
=================================================
% sqlplus rman/rman @catdb
SQL > SELECT * FROM rcver;
VERSION
———
11.01.00
If the table displays multiple rows, then the highest version in the RCVER table is the current catalog schema
version. The table stores only the major version numbers and not the patch numbers