Recovery Catalog   «Prev  Next»

Lesson 2Adding Information to the Recovery Catalog
ObjectiveAdd information to the recovery catalog.

Adding Information to the Oracle Recovery Catalog and Database Backup and Recovery

To add information to the Oracle Recovery Catalog, a database administrator (DBA) would typically use the `REGISTER DATABASE` command. This command is part of Oracle's Recovery Manager (RMAN) toolset, which is specifically designed for backup and recovery operations.
When executing the `REGISTER DATABASE` command, RMAN connects to both the target database (the database being backed up) and the recovery catalog database. The command then registers the target database in the recovery catalog, allowing RMAN to store metadata about the target database's backup and recovery activities.
Here's a basic example of how to use this command:
RMAN> CONNECT TARGET /
RMAN> CONNECT CATALOG rman_user@catalog_db
RMAN> REGISTER DATABASE;

In this example:
  • `CONNECT TARGET /` establishes a connection to the target database using operating system authentication.
  • `CONNECT CATALOG rman_user@catalog_db` connects to the recovery catalog database using the specified RMAN catalog schema (`rman_user`) and database (`catalog_db`).
  • `REGISTER DATABASE` instructs RMAN to register the target database in the recovery catalog.

It is important to note that the `REGISTER DATABASE` command should be used with care and only when necessary, as it modifies the recovery catalog. DBAs should ensure they have the appropriate permissions and understand the impact of this operation on the backup and recovery strategy of the Oracle database environment.

What the Recovery Catalog stores

The recovery catalog stores a great deal of information about your backup and restore operations. Although you will rarely need to use the catalog command, you will use it to add information about your data file copies, archived log files, control files, and any other file that belongs to your target database. You must add this information to your recovery catalog for it to be considered by Recovery Manager (RMAN) in any recovery situation. A vast amount of information may not be stored in the recovery catalog. For example, you may back up your database without Recovery Manager. If you then install Recovery Manager and a recovery catalog, these files will need to be inserted into the recovery catalog to be considered for restore operations. Some installations perform operating-system-level backups. Because these are performed outside the scope of Recovery Manager, the recovery catalog has no knowledge of these backups. You would need to use the catalog command to add this information to your recovery catalog. Let us take a look at the basic syntax and some possible catalog commands.

catalog {datafilecopy, archivelog, backup, 
controlfilecopy} 'filename';

This command will update the recovery catalog with a data file copy.
catalog datafilecopy 'C:\backup\usrorc1_001.bak'

This command will update the recovery catalog with an archive log file.
catalog archivelog 'C:\backup\arch_0001.log'

This command will update the recovery catalog with a copy of the control file.
catalog controlfilecopy 'C:\backup\ctl1orc1.ora'

Oracle 11g: backup from standby host to primary host or vice versa

Note: You can transfer a backup from a standby host to a primary host or vice versa, connect as TARGET to the database on this host, and then use the CATALOG command to catalog the backup. After a file is cataloged by the target database, the file is associated with the target database.

You can use the CATALOG command to inspect an existing image copy and enter its metadata into the RMAN repository. However, the CATALOG command does not do the following:
  1. Read all blocks in the data file copy to ensure there are no corruptions
  2. Guarantee that the image copy was correctly made in backup mode. After you catalog these files, you can use them with the RESTORE or SWITCH commands just as you can for RMAN-generated image copies.

Some sites store their datafiles on mirrored disk volumes, which permit the creation of image copies by breaking a mirror. After you have broken the mirror, you can notify RMAN of the existence of a new user-managed copy, thus making it eligible for a backup. You must notify RMAN when the copy is no longer available by using the
CHANGE ... UNCATALOG 

command.
In the next lesson, you will learn how to re-create a recovery catalog.

SEMrush Software