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

The Geek Diary

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

How To Catalog Backups / Archivelogs / Datafile Copies / Controlfile Copies in Oracle Database

by admin

The RMAN CATALOG command is used to accomplish the following:

  • Add backup pieces and image copies on disk to the RMAN repository.
  • 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.
  • Record the existence of the last user-managed datafile copies made after the final shutdown.

Restrictions and Usage Notes

  • You must be connected to the target database, which must be mounted or open.
  • If RMAN is connected to a recovery catalog, then the catalog database must be open.
  • For a user-managed copy to be cataloged, it must be a datafile copy, control file copy, archived log, or backup piece.
  • Accessible on disk.
  • You cannot use CATALOG to catalog a file that belongs to a different database.
Note: RMAN treats all user-managed backups as image copies. Note that during cataloging, RMAN does not check whether the file was correctly copied by the operating system utility; it just checks the header.

Examples

1. Cataloging an Archived Redo Log:

This example assumes that you made operating system copies of archived logs or transferred them from another location, and then added them to the RMAN repository:

RMAN> CATALOG ARCHIVELOG '?/oradata/archive1_30.dbf', '?/oradata/archive1_31.dbf', '?/oradata/archive1_32.dbf';

2. Cataloging a File Copy as an Incremental Backup:

The following example catalogs datafile copy users01.bak as an incremental level 0 backup:

RMAN> CATALOG DATAFILECOPY '?/oradata/users01.bak' LEVEL 0; 

Note that you can create datafile copies either using the RMAN BACKUP AS COPY command, or by using operating system utilities in conjunction with ALTER TABLESPACE BEGIN/END BACKUP.

3. Catlog a user managed controlfile copy in the RMAN repository

The folllowing example catalogs a user managed controlfile copy in the RMAN repository:

sql> alter database backup controlfile to 'disk1/control01.ctl';

The command to catalog a controlfile copy is below:

RMAN> catalog controlfilecopy '/disk1/control01.ctl';

4. Cataloging Multiple Copies in a Directory:

The following example catalogs a directory full of archived logs that were copied into the /tmp/arch_logs directory with an operating system utility:

RMAN> CATALOG START WITH '/tmp/arch_logs'; 

5. Cataloging Files in the Flash Recovery Area:

The following example catalogs all files in the currently enabled flash recovery area without prompting the user for each one:

RMAN> CATALOG RECOVERY AREA NOPROMPT;

6. Cataloging Backup Pieces:

The following example catalogs a RMAN backup piece that was copied with an operating system utility:

RMAN> CATALOG BACKUPPIECE '?/oradata/01dmsbj4_1_1.bcp'; 

The below command will catalog the backup pieces held in the location set for db_recovery_file_dest parameter:

RMAN> catalog db_recovery_file_dest;

Filed Under: oracle, Oracle 10g, Oracle 11g, oracle 12c, RMAN

Some more articles you might also be interested in …

  1. How to change static parameters through SPFILE parameter file in Oracle Database
  2. How to use Privilege Analysis in Oracle Database
  3. Oracle Database – Configuring Secure Application Roles
  4. How to Trace Dynamic Registration from PMON or LREG (Oracle 12c)
  5. ASM Fast Mirror Resync Feature – Example To Simulate Transient Disk Failure And Restore Disk
  6. How to Create or Remove Restore Point on Oracle Standby database
  7. Oracle Database 12c New Feature: SYSRAC administrative privilege
  8. Difference between SQL and SQL*Plus Statements
  9. How to Connect to an Oracle Pluggable Database (PDB)
  10. How to pass a value from shell script to GoldenGate replicat for mapping to target table column

You May Also Like

Primary Sidebar

Recent Posts

  • aws ec2: CLI for AWS EC2 (Command Examples)
  • aws cur – Create, query, and delete AWS usage report definitions (Command Examples)
  • aws configure – Manage configuration for the AWS CLI (Command Examples)
  • aws cognito-idp: Manage Amazon Cognito user pool and its users and groups using the CLI

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright