Skip to content

RMAN CATALOG

    RMAN Catalog is a database schema that contains RMAN metadata for a set of target databases.

    Creating a Recovery Catalog and Registering a Database

    Assume that you start SQL*Plus and connect to the recovery catalog catdb with administrator privileges. You execute the CREATE USER statement as follows, replacing password with a user-specified password. The SQL statement creates a user rco in database catdb and grant the rco user the RECOVERY_CATALOG_OWNER role.

    SQL> CREATE USER rco IDENTIFIED BY password
      2  DEFAULT TABLESPACE cattbs
      3  QUOTA UNLIMITED ON cattbs;
    SQL> GRANT recovery_catalog_owner TO rco;
    SQL> EXIT
    

    You then start RMAN and run the following RMAN commands to connect to the recovery catalog database as rco and create the recovery catalog:

    RMAN> CONNECT CATALOG [email protected]
    
    recovery catalog database Password: password
    connected to recovery catalog database
    
    RMAN> CREATE CATALOG;
    

    In the same RMAN session, you connect to a target database using operating system authentication and use the REGISTER DATABASE command to register this database in the catalog:

    RMAN> CONNECT TARGET /
    RMAN> REGISTER DATABASE;
    RMAN> EXIT

    Creating a Virtual Private Catalog

    You create the vpc1 user and grant recovery catalog ownership as follows, replacing password with a user-specified password:

    SQL> CREATE USER vpc1 IDENTIFIED BY password
      2  DEFAULT TABLESPACE vpcusers;
    SQL> GRANT CREATE SESSION TO vpc1;
    SQL> EXIT
    

    You then start RMAN and connect to the recovery catalog database as the catalog owner rco. By default, the virtual catalog owner has no access to the base recovery catalog. You use the GRANT command to grant virtual private catalog access to vpc1 for RMAN operations on database prod1 (but not prod2):

    RMAN> CONNECT CATALOG [email protected]
     
    recovery catalog database Password: password
    connected to recovery catalog database
    
    RMAN> GRANT CATALOG FOR DATABASE prod1 TO vpc1;
    RMAN> EXIT;
    

    Now the backup operator who will use virtual private catalog vpc1 is ready to create the virtual catalog. In the following example, the backup operator connects to the recovery catalog database as vpc1 and registers the database prod1 with vpc1.

    The virtual private catalog is created automatically when catalog privileges are granted to the virtual private catalog owner.

    RMAN> CONNECT CATALOG [email protected]
    
    recovery catalog database Password: password
    connected to recovery catalog database
    
    RMAN> REGISTER DATABASE prod1;
    RMAN> EXIT;
    

    Cataloging a Data File Copy as an Incremental Backup

    Assume that you used a Linux utility to back up the users01.dbf data file to /disk2/backup/users01.bak. This example catalogs the data file copy as an incremental level 0 backup and then lists all copies.

    CATALOG DATAFILECOPY '/disk2/backup/users01.bak' LEVEL 0;
    LIST COPY;

    Cataloging Multiple Copies in a Directory

    This example catalogs a directory full of archived redo log files that were copied into the /disk2/archlog directory with an operating system utility. The example includes sample output.

    CATALOG START WITH '/disk2/archlog' NOPROMPT; 
    
    searching for all files that match the pattern /disk2/archlog
     
    List of Files Unknown to the Database
    =====================================
    File Name: /disk2/archlog/o1_mf_1_10_24trtc7s_.arc
    File Name: /disk2/archlog/o1_mf_1_11_24trtg7s_.arc
    File Name: /disk2/archlog/o1_mf_1_12_24trtk84_.arc
    File Name: /disk2/archlog/o1_mf_1_13_24trtn85_.arc
    File Name: /disk2/archlog/o1_mf_1_14_24trtq84_.arc
    File Name: /disk2/archlog/o1_mf_1_15_24trtt84_.arc
    File Name: /disk2/archlog/o1_mf_1_16_24trtx84_.arc
    File Name: /disk2/archlog/o1_mf_1_17_24trv085_.arc
    File Name: /disk2/archlog/o1_mf_1_18_24trv385_.arc
    File Name: /disk2/archlog/o1_mf_1_19_24trv685_.arc
    cataloging files...
    cataloging done
     
    List of Cataloged Files
    =======================
    File Name: /disk2/archlog/o1_mf_1_10_24trtc7s_.arc
    File Name: /disk2/archlog/o1_mf_1_11_24trtg7s_.arc
    File Name: /disk2/archlog/o1_mf_1_12_24trtk84_.arc
    File Name: /disk2/archlog/o1_mf_1_13_24trtn85_.arc
    File Name: /disk2/archlog/o1_mf_1_14_24trtq84_.arc
    File Name: /disk2/archlog/o1_mf_1_15_24trtt84_.arc
    File Name: /disk2/archlog/o1_mf_1_16_24trtx84_.arc
    File Name: /disk2/archlog/o1_mf_1_17_24trv085_.arc
    File Name: /disk2/archlog/o1_mf_1_18_24trv385_.arc
    File Name: /disk2/archlog/o1_mf_1_19_24trv685_.arc

    Cataloging Files in the Fast Recovery Area

    This example catalogs all files in the currently enabled fast recovery area without prompting the user for each one. As shown in the sample output, RMAN displays a message if it finds no files to catalog.

    CATALOG RECOVERY AREA;
     
    searching for all files in the recovery area
    no files found to be unknown to the database

    Cataloging a Backup Piece

    Assume that you use an operating system utility to copy a backup piece from one location to another. This example catalogs the backup piece in the new location (sample output included):

    CATALOG BACKUPPIECE '/disk1/c-874220581-20131128-01';
    
    using target database control file instead of recovery catalog
    cataloged backup piece
    backup piece handle=/disk1/c-874220581-20131128-01 RECID=12 STAMP=607695990

    IMPORT CATALOG

    Importing Metadata for All Registered Databases

    RMAN imports metadata for all database IDs registered in rcat into the recovery catalog owned by rco. All target databases registered in rcat are unregistered.

    RMAN> CONNECT CATALOG [email protected]
    
    recovery catalog database Password: password
    connected to recovery catalog database
     
    RMAN> IMPORT CATALOG [email protected];
     
    Starting import catalog at 15-FEB-13
    source recovery catalog database Password: password
    connected to source recovery catalog database
    import validation complete
    database unregistered from the source recovery catalog
    Finished import catalog at 15-FEB-13

    Importing Metadata for a Subset of Registered Databases

    Instead of importing the entire recovery catalog, it imports only the metadata for the database with DBID 1618984270.

    RMAN> CONNECT CATALOG [email protected]
    
    recovery catalog database Password: password
    connected to recovery catalog database
     
    RMAN> IMPORT CATALOG [email protected] DBID=1618984270;
     
    Starting import catalog at 15-FEB-13
    source recovery catalog database Password: password
    connected to source recovery catalog database
    import validation complete
    database unregistered from the source recovery catalog
    Finished import catalog at 15-FEB-13

    DROP CATALOG

    Execute this command only at the RMAN prompt.

    You must be connected to the recovery catalog schema with the CATALOG command-line option or the CONNECT CATALOG command. The recovery catalog database must be open.

    You do not have to be connected to a target database.

    DROP CATALOG

    Recovery Catalog Views

    Recovery Catalog ViewCorresponding V$ ViewCatalog View Description
    RC_ARCHIVED_LOGV$ARCHIVED_LOGArchived and unarchived redo log files
    RC_BACKUP_ARCHIVELOG_DETAILSV$BACKUP_ARCHIVELOG_DETAILSDetails about archived redo log backups for Enterprise Manager
    RC_BACKUP_ARCHIVELOG_SUMMARYV$BACKUP_ARCHIVELOG_SUMMARYSummary of information about archived redo log backups for Enterprise Manager
    RC_BACKUP_CONTROLFILEV$BACKUP_DATAFILEControl files backed up in backup sets
    RC_BACKUP_CONTROLFILE_DETAILSV$BACKUP_CONTROLFILE_DETAILSDetails about control file backups for Enterprise Manager
    RC_BACKUP_CONTROLFILE_SUMMARYV$BACKUP_CONTROLFILE_SUMMARYSummary of information about control file backups for Enterprise Manager
    RC_BACKUP_COPY_DETAILSV$BACKUP_COPY_DETAILSDetails about data file image copy backups for Enterprise Manager
    RC_BACKUP_COPY_SUMMARYV$BACKUP_COPY_SUMMARYSummary of information about data file image copy backups for Enterprise Manager
    RC_BACKUP_CORRUPTIONV$BACKUP_CORRUPTIONCorrupt block ranges in data file backups
    RC_BACKUP_DATAFILEV$BACKUP_DATAFILEData files in backup sets
    RC_BACKUP_DATAFILE_DETAILSV$BACKUP_DATAFILE_DETAILSDetails about data file backups for Enterprise Manager
    RC_BACKUP_DATAFILE_SUMMARYV$BACKUP_DATAFILE_SUMMARYSummary of information about data file backups for Enterprise Manager
    RC_BACKUP_FILESV$BACKUP_FILESRMAN backups and copies known to the repository.
    RC_BACKUP_PIECEV$BACKUP_PIECEBackup pieces
    RC_BACKUP_PIECE_DETAILSV$BACKUP_PIECE_DETAILSDetails about backup pieces for Enterprise Manager
    RC_BACKUP_REDOLOGV$BACKUP_REDOLOGArchived redo log files in backup sets
    RC_BACKUP_SETV$BACKUP_SETBackup sets for all incarnations of databases registered in the catalog
    RC_BACKUP_SET_DETAILSV$BACKUP_SET_DETAILSDetails about backup sets for Enterprise Manager
    RC_BACKUP_SET_SUMMARYV$BACKUP_SET_SUMMARYSummary of information about backup sets for Enterprise Manager
    RC_BACKUP_SPFILEV$BACKUP_SPFILEServer parameter files in backups
    RC_BACKUP_SPFILE_DETAILSV$BACKUP_SPFILE_DETAILSDetails about server parameter file backups for Enterprise Manager
    RC_BACKUP_SPFILE_SUMMARYV$BACKUP_SPFILE_SUMMARYSummary of information about server parameter file backups for Enterprise Manager
    RC_CHECKPOINTn/aDeprecated in favor of RC_RESYNC
    RC_CONTROLFILE_COPYV$DATAFILE_COPYControl file copies on disk
    RC_COPY_CORRUPTIONV$COPY_CORRUPTIONCorrupt block ranges in data file copies
    RC_DATABASEV$DATABASEDatabases registered in the recovery catalog
    RC_DATABASE_BLOCK_CORRUPTIONV$DATABASE_BLOCK_CORRUPTIONDatabase blocks marked as corrupted in the most recent RMAN backup or copy
    RC_DATABASE_INCARNATIONV$DATABASE_INCARNATIONDatabase incarnations registered in the recovery catalog
    RC_DATAFILEV$DATAFILEData files registered in the recovery catalog
    RC_DATAFILE_COPYV$DATAFILE_COPYData file copies on disk
    RC_DISK_RESTORE_RANGEV$DISK_RESTORE_RANGEDetails about the restore range of the database for backup data stored on disk
    RC_LOG_HISTORYV$LOG_HISTORYOnline redo log history indicating when log switches occurred
    RC_OFFLINE_RANGEV$OFFLINE_RANGEOffline ranges for data files
    RC_PDBSV$PDBSPluggable databases (PDBs) registered in the recovery catalog
    RC_PLUGGABLE_DATABASE_INCV$PDB_INCARNATIONPDB incarnations registered in the recovery catalog
    RC_PROXY_ARCHIVEDLOGV$PROXY_ARCHIVEDLOGArchived log backups taken with the proxy copy functionality
    RC_PROXY_ARCHIVELOG_DETAILSV$PROXY_ARCHIVELOG_DETAILSDetails about proxy archived redo log files for Enterprise Manager
    RC_PROXY_ARCHIVELOG_SUMMARYV$PROXY_ARCHIVELOG_SUMMARYSummary of information about proxy archived redo log files for Enterprise Manager
    RC_PROXY_CONTROLFILEV$PROXY_DATAFILEControl file backups taken with the proxy copy functionality
    RC_PROXY_COPY_DETAILSV$PROXY_COPY_DETAILSDetails about data file proxy copies for Enterprise Manager
    RC_PROXY_COPY_SUMMARYV$PROXY_COPY_SUMMARYSummary of information about data file proxy copies for Enterprise Manager
    RC_PROXY_DATAFILEV$PROXY_DATAFILEData file backups that were taken using the proxy copy functionality
    RC_REDO_LOGV$LOG and V$LOGFILEOnline redo logs for all incarnations of the database since the last catalog resynchronization
    RC_REDO_THREADV$THREADAll redo threads for all incarnations of the database since the last catalog resynchronization
    RC_RESTORE_POINTV$RESTORE_POINTAll restore points for all incarnations of the database since the last catalog resynchronization
    RC_RESTORE_RANGEV$RESTORE_RANGEDetails about the restore range of databases registered in the recovery catalog
    RC_RESYNCn/aRecovery catalog resynchronizations
    RC_RMAN_BACKUP_JOB_DETAILSV$RMAN_BACKUP_JOB_DETAILSDetails about backup jobs for Enterprise Manager
    RC_RMAN_BACKUP_SUBJOB_DETAILSV$RMAN_BACKUP_SUBJOB_DETAILSDetails about backup subjobs for Enterprise Manager
    RC_RMAN_BACKUP_TYPEV$RMAN_BACKUP_TYPEUsed internally by Enterprise Manager
    RC_RMAN_CONFIGURATIONV$RMAN_CONFIGURATIONRMAN configuration settings
    RC_RMAN_OUTPUTV$RMAN_OUTPUTOutput from RMAN commands for use in Enterprise Manager
    RC_RMAN_STATUSV$RMAN_STATUSHistorical status information about RMAN operations.
    RC_SBT_RESTORE_RANGEV$SBT_RESTORE_RANGEDetails about the restore range of the database for backup data stored on tape
    RC_SITEn/aDatabases in a Data Guard environment
    RC_STORED_SCRIPTn/aNames of scripts stored in the recovery catalog
    RC_STORED_SCRIPT_LINEn/aContents of the scripts stored in the recovery catalog
    RC_TABLESPACEV$TABLESPACEAll tablespaces registered in the recovery catalog, all dropped tablespaces, and tablespaces that belong to old incarnations
    RC_TEMPFILEV$TEMPFILEAll temp files registered in the recovery catalog
    RC_UNUSABLE_BACKUPFILE_DETAILSV$UNUSABLE_BACKUPFILE_DETAILSUnusable backup files registered in the recovery catalog

    Also See:

    Oracle RMAN