How to create RMAN recovery catalog and register database in catalog

Last updated on July 29th, 2018 at 10:33 am

RMAN Recovery catalog is a very important registry. Control file registry get rotated after some time so you lost many backup information. By storing backup information in recovery catalog ,you get rid of this problem

Also it provides a central repository where you can find all the backup information.

Here are the steps on How to create recovery catalog  and register database in catalog

Creating catalog

1) Create a Recovery Catalog Tablespace

CREATE TABLESPACE R_CATALOG
LOGGING
DATAFILE ‘/u00/R_CATALOG.dbf’ SIZE 200M;

2) Create the rman schema

CREATE USER rman IDENTIFIED BY cat TEMPORARY TABLESPACE temp DEFAULT TABLESPACE R_CATALOG QUOTA UNLIMITED ON R_CATALOG;

3) Grant required roles to the User

Grant RECOVERY_CATALOG to the schema rman
GRANT RECOVERY_CATALOG_OWNER TO rman;

4)Connect to User as RMAN

RMAN rman/pass@db

5) Run the CREATE CATALOG script to create the recovery catalog

RMAN> CREATE CATALOG

6) Connect into the Oracle database as rman and verify the tables

sqlplus rman/pass@db
SELECT table_name from user_tables;

 

Registering a Target Database in the Recovery Catalog

1) Connect into RMAN
$ORACLE_HOME/bin/rman TARGET / CATALOG
rman/pass@db

2) register database using the command

RMAN > register database;

3) Verify that the registration was successful by running REPORT SCHEMA

RMAN > REPORT SCHEMA;

How to take store backup information in the catalog

There are two ways.

  1. when you take backup , connect to catalog also

$ORACLE_HOME/bin/rman TARGET / CATALOG  rman/pass@db

RMAN> backup database;

2) You can take backup using control file, then run rsync  catalog to sync the control file to catalog repository

Connect into RMAN
$ORACLE_HOME/bin/rman TARGET / CATALOG rman/pass@db

RMAN>rsync database;

How to catalog files on  the filesystem

If you have datafile copies, backup pieces, or archived logs on disk, then you can catalog them in the recovery catalog with the CATALOG command.

CATALOG DATAFILECOPY ‘/xyz/old_datafiles/01_01_2003/users01.dbf’;
CATALOG ARCHIVELOG ‘/xyz/arch_logs/archive1_731.dbf’,
‘/xyz/arch_logs/archive1_732.dbf’;
CATALOG BACKUPPIECE ‘/xyz/backups/backup_820.bkp’;

You can also catalog multiple backup files in a directory at once by using the CATALOG START WITH command, as shown in the following example:

CATALOG START WITH ‘/xyz/backups/’;

Leave a Reply