In this post, we will learn about how to use RMAN Catalog Command, how to use catalog start with command, and how to catalog backup pieces on tapes
RMAN Catalog command
- You re-create the control file and you dont use the recovery catalog and use the control file only to store the RMAN data, thereby losing all RMAN repository data. You can catalog all the backups, datafile, and archivelog again with the catalog command
- You copy or move a backup piece with an OS cp and mv command and want it to be usable from another location by RMAN.
- Sometimes you have run cross-check and the filesystem where backups are stored is down or not accessible, The RMAN metadata for the backup piece will be expired and later removed as part of the delete expired command. Now when you restore the filesystem. you can again catalog the backup pieces with the CATALOG command
- Suppose your control file auto backup is disabled, you back up the control file and then back up the archived redo logs. Now when you restore the control file and mount the database, then it will not know about the archive backups taken after that. Then you can use the CATALOG command to catalog the backup pieces containing the archived redo logs backed up after the control file.
- It is also possible to use the CATALOG command for backup pieces stored in TAPE with 10.2 Onwards
What all can be catalog
- backup pieces and image copies on disk
- Record a datafile copy as a level 0 incremental backup in the RMAN repository, which enables you to use it as part of an incremental backup strategy.
- backup pieces on Tapes
What cannot be catalog
- CATALOG to catalog a file that belongs to a different database.
Now let’s look at various RMAN Catalog command
How to catalog archive log in RMAN
rman target / CATALOG ARCHIVELOG '/u01/oradata/archive1_86969.dbf';
How to catalog the datafile copy
CATALOG DATAFILECOPY '/u01/oradata/system01.1' LEVEL 0;
How to catalog the backup piece
CATALOG BACKUPPIECE '/u01/oradata/fra/01dms4744_1_1.bcp';
How to use the catalog start with
Sometimes, there are multiple backup pieces or datafile copies to be cataloged, then we can use the catalog start with command. we need to specify the directory location and it will catalog all the files inside that
CATALOG START WITH '/u01/archive_logs/';
How to catalog the backup pieces on tape
Define a tape channel in the RMAN automatic configuration:
RMAN> CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE'
Check that channel configuration is correct
RMAN> show all;
CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=/usr/local/oracle/backup/lib/libobk.so,ENV=(OB_MEDIA_FAMILY=RMAN-DEFAULT)';
Catalog the backup piece
RMAN> CATALOG DEVICE TYPE 'SBT_TAPE' BACKUPPIECE '0pivagf8_1_1';
Here is the example for Netbackup
CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' PARMS 'ENV=(NB_ORA_CLASS=oraclebkup, SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so)'; CATALOG DEVICE TYPE 'SBT_TAPE' BACKUPPIECE 'ujgjklij1qaa3_1_1';
Hope you like this post on how to use RMAN Catalog Command, how to use catalog start with command, and how to catalog backup pieces on tapes
RMAN Backup Commands : Check out the RMAN Backup commands in this post. This is going to be very helpful for the person who is involved in backup and recovery
Oracle RMAN interview questions : Oracle RMAN Interview Questions are must for Oracle DBA’s looking for a change. Oracle Backup and recovery is one of the essential duties of Oracle DBA
oracle dba interview questions for experienced professionals : check out awesome oracle dba interview questions and answers to succeed in any oracle database interviews. This will test your knowledge on various fronts
RMAN-06059 : Check out how to resolve the RMAN-06059: expected archived log not found, loss of archived log compromises recoverability
RMAN-20004 : RMAN-20004 happens when a Database has been cloned and a connection made from the clone to Catalog using rman without changing the DBID of the clone
RMAN Crosscheck : check out this post on RMAN crosscheck command, Crosscheck backup, crosscheck archivelog all, Crosscheck backup