Friday, August 16, 2019

Oracle RMAN - catalog backup from the sbt_tape device

Sometimes you need simply re-catalog (or something else) the backup piece of RMAN backup made to the tape device. The documentation doesn't direct you to the options mention here, but it works. Try it !

The 'catalog command of Oracle RMAN have option 'device'. Look :

RMAN> catalog ;                                                                                                                                                                             

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found ";": expecting one of: "archivelog, backuppiece, backup, controlfilecopy, datafilecopy, db_recovery_file_dest, device, recovery, start"
RMAN-01007: at line 1 column 9 file: standard input


When you're trying to catalog a backuppiece from the tape, the error appears :

RMAN> catalog device type sbt_tape backuppiece 'arc_db_68u7hhgd_1_1' ;

RMAN-06470: DEVICE TYPE is supported only when automatic channels are used

Configure automatic channel with parameters you're using and you will get a success :

RMAN> configure channel device type sbt_tape parms 'SBT_LIBRARY=/u01/app/oracle/hpe/HPE-Catalyst-RMAN-Plugin/bin/libisvsupport_rman.so ENV=(CONFIG_FILE=/u01/app/oracle/hpe/HPE-Catalyst-RMAN-Plugin/config/plugin_db.conf)' ;

RMAN> catalog device type sbt_tape backuppiece 'full_db_sb_9cu82od1_1_1' ;                                                                                                              
                                                                                                                                                                                            
allocated channel: ORA_SBT_TAPE_1                                                                                                                                                           
channel ORA_SBT_TAPE_1: SID=560 device type=SBT_TAPE                                                                                                                                        
channel ORA_SBT_TAPE_1: HPE StoreOnce Catalyst Plugin for RMAN                                                                                                                              
cataloged backup piece                                                                                                                                                                      
backup piece handle=full_db_sb_9cu82od1_1_1 RECID=3539 STAMP=1016455268


You can query the result and continue to work with backup as you need.

Good Luck !