RMAN metadata is always stored in the control file of the target database
RMAN metadata can be additionally be stored in a recovery catalog. The recovery catalog is a dedicated schema, usually in a separate database.
The RMAN recovery catalog is created by the RMAN client running the CREATE CATALOG command.
To create a recovery catalog, first configure a separate database e,g. RMAN1
Create a TNS entry for the recovery catalog database. For example:
RMAN = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = vm23)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = RMAN1) ) )
As SYSDBA in the new database create an RMAN user as follows:
CREATE USER rman IDENTIFIED BY rman DEFAULT TABLESPACE users QUOTA UNLIMITED ON users;
Grant RECOVERY_CATALOG_OWNER privilege to the RMAN user:
GRANT RECOVERY_CATALOG_OWNER TO rman;
Start an RMAN client that connects to both target database and the RMAN catalog database. For example assume the RMAN client is started on the target database server:
rman TARGET / CATALOG rman/rman@rman;
Create a catalog as follows:
CREATE CATALOG;
Note that the CATALOG must be explicitly specified in all subsequent RMAN commands.
To register a database with the recovery catalog use:
RMAN> REGISTER DATABASE; database registered in recovery catalog starting full resync of recovery catalog full resync complete
A full resynchronization is performed when the target database is registered with the recovery catalog.
To resynchonize the catalog with the control file use:
RESYNC CATALOG; starting full resync of recovery catalog full resync complete
Note that the database must already be registered with the recovery catalog to perform a resynchronization.
To remove the target database from the recovery catalog use UNREGISTER DATABASE. For example:
RMAN> UNREGISTER DATABASE; database name is "TEST" and DBID is 2066695660 Do you really want to unregister the database (enter YES or NO)? yes database unregistered from the recovery catalog
To suppress the prompt use:
RMAN> UNREGISTER DATABASE NOPROMPT; database name is "TEST" and DBID is 2066695660 database unregistered from the recovery catalog
In Oracle 11.2.0.4 the recovery catalog contains the following object types:
Object Type | # Objects |
FUNCTION | 2 |
INDEX | 96 |
PACKAGE | 2 |
PACKAGE BODY | 2 |
SEQUENCE | 1 |
TABLE | 44 |
TRIGGER | 3 |
TYPE | 3 |
TYPE BODY | 1 |
VIEW | 98 |
Of the views there are 55 top level recovery catalog views with the RC prefix:
RC_ARCHIVED_LOG | RC_BACKUP_PIECE_DETAILS | RC_DATAFILE | RC_RESYNC |
RC_BACKUP_ARCHIVELOG_DETAILS | RC_BACKUP_REDOLOG | RC_DATAFILE_COPY | RC_RMAN_BACKUP_JOB_DETAILS |
RC_BACKUP_ARCHIVELOG_SUMMARY | RC_BACKUP_SET | RC_LOG_HISTORY | RC_RMAN_BACKUP_SUBJOB_DETAILS |
RC_BACKUP_CONTROLFILE | RC_BACKUP_SET_DETAILS | RC_OFFLINE_RANGE | RC_RMAN_BACKUP_TYPE |
RC_BACKUP_CONTROLFILE_DETAILS | RC_BACKUP_SET_SUMMARY | RC_PROXY_ARCHIVEDLOG | RC_RMAN_CONFIGURATION |
RC_BACKUP_CONTROLFILE_SUMMARY | RC_BACKUP_SPFILE | RC_PROXY_ARCHIVELOG_DETAILS | RC_RMAN_OUTPUT |
RC_BACKUP_COPY_DETAILS | RC_BACKUP_SPFILE_DETAILS | RC_PROXY_ARCHIVELOG_SUMMARY | RC_RMAN_STATUS |
RC_BACKUP_COPY_SUMMARY | RC_BACKUP_SPFILE_SUMMARY | RC_PROXY_CONTROLFILE | RC_SITE |
RC_BACKUP_CORRUPTION | RC_CHECKPOINT | RC_PROXY_COPY_DETAILS | RC_STORED_SCRIPT |
RC_BACKUP_DATAFILE | RC_CONTROLFILE_COPY | RC_PROXY_COPY_SUMMARY | RC_STORED_SCRIPT_LINE |
RC_BACKUP_DATAFILE_DETAILS | RC_COPY_CORRUPTION | RC_PROXY_DATAFILE | RC_TABLESPACE |
RC_BACKUP_DATAFILE_SUMMARY | RC_DATABASE | RC_REDO_LOG | RC_TEMPFILE |
RC_BACKUP_FILES | RC_DATABASE_BLOCK_CORRUPTION | RC_REDO_THREAD | RC_UNUSABLE_BACKUPFILE_DETAILS |
RC_BACKUP_PIECE | RC_DATABASE_INCARNATION | RC_RESTORE_POINT |