• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

The Geek Diary

CONCEPTS | BASICS | HOWTO

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • Linux Services
    • VCS
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
    • Data Guard
  • DevOps
    • Docker
    • Shell Scripting
  • Interview Questions
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

Oracle Database: How to catalog tape backup pieces

By admin

Starting with 10g, it’s possible to use the RMAN CATALOG command to add backuppieces stored in the disk to the RMAN repository. You may need to catalog backup pieces in the following situations:

  • You copy or move a backup piece with an operating system utility and want it to be usable by RMAN.
  • The RMAN metadata for the backup piece was removed, but the backup piece still exists. This situation can occur if you ran the DELETE command on a backup piece that was only temporarily unavailable.
  • You make a NOCATALOG backup on one database host in a Data Guard environment and move the backup piece to the same location on a different database host. In this case, the recovery catalog has no record of the original backup piece.
  • You do not use a recovery catalog and must re-create the control file, thereby losing all RMAN repository data. Cataloging your backups makes them available again.
  • When control file autobackup is disabled, you back up the control file and then back up the archived redo logs. You can restore and mount the control file but must catalog the backup pieces containing the archived redo logs backed up after the control file.

But it’s not possible to use the CATALOG command for backup pieces stored in TAPE. This post explains how to add backuppieces stored in disk to the repository. From 10.1, there is an undocumented command that allows to catalog tape backup pieces:

RMAN> CATALOG DEVICE TYPE 'SBT_TAPE' BACKUPPIECE '[handle]';

Prerequisites

1. Use automatic channel configuration. It’s mandatory to configure one sbt_tape device channel in your rman automatic configuration parameters:

RMAN> CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' PARMS '[MM parameters]'

2. It’s necessary to know the backup piece file name in the tape and the backup piece file needs to be available and accessible.

Steps

Once there is a tape channel configured for accessing to the tape, the rman CATALOG command can be used to insert in RMAN catalog the tape backup piece:

RMAN> CATALOG DEVICE TYPE 'SBT_TAPE' BACKUPPIECE '[handle]';

Examples

This is an example using Oracle Secure Backup (OSB):

1. Define a tape channel in the RMAN automatic configuration:

RMAN> CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE'
  PARMS 'SBT_LIBRARY=/usr/local/oracle/backup/lib/libobk.so,ENV=(OB_MEDIA_FAMILY=RMAN-DEFAULT)';

2. 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)';
....

3. Catalog the backup piece:

RMAN> CATALOG DEVICE TYPE 'SBT_TAPE' BACKUPPIECE '0pivagf8_1_1';

– The following will catalog a backuppiece on netbackup:

RMAN>CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' 
  PARMS 'ENV=(NB_ORA_CLASS=oraclebkup, SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so)';
RMAN> CATALOG DEVICE TYPE 'SBT_TAPE' BACKUPPIECE 'lij1qaa3_1_1';

Filed Under: oracle, RMAN

Some more articles you might also be interested in …

  1. How To Recover From Lost SYS Password in Oracle Database
  2. Adding Users to Oracle Passwordfile (Oracle Passwordfile Authentication)
  3. Oracle Database 18c: Roll Forward Physical Standby Using RMAN Incremental Backup in Single Command
  4. SLES 12: Database Startup Error with ORA-27300 ORA-27301 ORA-27303 While Starting using Srvctl
  5. Oracle Database : Startup basics (How to start Oracle Database)
  6. How to Disable Oracle Net Tracing on a Server Process without Stopping the Process
  7. How To Create an Encrypted Tablespace in Oracle 12c Pluggable Database
  8. Oracleasm Service Fails to Start After Upgrade to oracleasm-support-2.1.11-1 RPM Package
  9. How to Monitor SGA Memory on Oracle Pluggable Databases
  10. How to move ASM spfile to a shared device in RAC

You May Also Like

Primary Sidebar

Recent Posts

  • What are different Oracle Database Vault Roles
  • Unable to export realm protected table using data pump
  • Beginners Guide to Oracle Database Vault
  • How to Disable IPv6 on Ubuntu 18.04 Bionic Beaver Linux
  • Archives
  • Contact Us
  • Copyright

© 2021 · The Geek Diary