Tuesday, 17 October 2017

Catalog backup files in RMAN | Oracle Database

Catalog the backup files in Oracle RMAN Repository

How to Catalog files in Oracle RMAN Repository? How to add files in RMAN Catalog?

Recovery Manager Catalog Oracle Database


There are times when you manually need to catalog oracle database related files into Oracle RMAN repository like backups, datafiles, logs etc. The reason is simple, RMAN doesn't know of these files and you want your database to know which file to use while performing different operations. Lets take a scenario of Oracle Database restore and recovery, I have a full oracle database RMAN backup and I need to restore it on some other system to replicate the same in order to create a Oracle Standby database. In such scenarios, before running restore command on the new system, I'll have to make sure that my RMAN repository knows of the fresh backup pieces from where the restoration will complete.

To achieve this, run the below mentioned command,

RMAN> catalog start with '/u01/app/oracle/backup';

It'll ask for the files with Yes/No options for whether you want to catalog the files or not. Also it will catalog everything present inside "backup" directory including subfolders and the files inside them.

To catalog files with no questioning,

RMAN> catalog start with '/u01/app/oracle/backup' noprompt;

To catalog files with noprompt as well as limit the catalog to a single directory and not any further,

RMAN> catalog start with '/u01/app/oracle/backup/' noprompt;

To catalog a single file,

RMAN> catalog backuppiece '/u01/app/oracle/backup/database_12.bkp';

No comments:

Post a comment