Home » Oracle » Oracle Database » How to create RMAN recovery catalog and register database in catalog

How to create RMAN recovery catalog and register database in catalog

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 it  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/';

I hope you like post . This will be really helpful for any body using recovery manager in there in Job role . Please do provide feedback

See also  Oracle password file Utility :ORAPWD

How to Create the RMAN Recovery Catalog in a Pluggable Database

  • You need to connect to PDB (pluggable database) using connect string and execute create catalog command.
  • The steps are the same as for a non-container database recovery catalog.
  • In a CDB environment, the only option is to place the rman catalog schema in a PDB and not in ROOT.

Also reads

3 thoughts on “How to create RMAN recovery catalog and register database in catalog”

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top