What is an Oracle Recovery Catalog? Differences from Control File Operations and How to Create One

English

When using “RMAN (Recovery Manager)” for Oracle Database backup operations, choosing where to store backup information is a critical decision. By using an Oracle Recovery Catalog, you can achieve long-term management exceeding the retention limits of control files and enable centralized management of multiple databases. This article explains the benefits of a Recovery Catalog and provides easy-to-follow steps for creation and registration, even for beginners.


Conclusion: When You Should Use a Recovery Catalog

In short, if you need to retain backup information for a long period (e.g., 365 days or more) or want to centrally manage multiple databases in one location, implementing a Recovery Catalog is strongly recommended.

To-Do List (Shortest Steps)

  1. Create a dedicated schema (user) in the catalog database and grant the necessary privileges.
  2. Connect to the catalog database via RMAN and execute CREATE CATALOG.
  3. REGISTER the target database into the Recovery Catalog.

Background and Basics: How the Recovery Catalog Works

Normally, RMAN backup history is recorded in the “Control File” of the target database itself. However, because control files are destined to be overwritten, old history eventually disappears. A “Recovery Catalog,” a dedicated external database, solves this issue.

Comparison: Control File Operation vs. Recovery Catalog Operation

Comparison ItemControl File Operation (Default)Recovery Catalog Operation
Information StorageTarget DB Control FileExternal dedicated database (Catalog DB)
Retention PeriodDepends on CONTROL_FILE_RECORD_KEEP_TIME (Usually 7+ days)Indefinite (Until manually deleted)
DB Total Loss CaseRequires restoration of the control fileInformation can be referenced immediately from the catalog
Multi-DB ManagementManaged separately for each DBAll DBs can be listed in a single catalog
Configuration ComplexitySimple (No additional DB required)Requires operation and maintenance of the catalog DB

Steps to Create a Recovery Catalog

When building a Recovery Catalog, two entities are involved: the “Catalog DB (the side that stores information)” and the “Target DB (the backup subject).”

Prerequisites

  • Target OS: Oracle Linux / Windows (Common)
  • Target Version: Oracle Database 19c
  • The Catalog DB must be started separately and be accessible via network connection (SQL*Net).

1. Create the Catalog User

Log in to the Catalog DB and create the schema that will store the catalog information.

-- Execute on the Catalog DB side (Connect as SYS user, etc.)
-- It is advisable to avoid special characters like "@" in the password.
CREATE USER rcat_owner IDENTIFIED BY password_2026;
ALTER USER rcat_owner QUOTA UNLIMITED ON users;
GRANT CONNECT, RESOURCE, RECOVERY_CATALOG_OWNER TO rcat_owner;

Note: The RECOVERY_CATALOG_OWNER role covers all the privileges necessary for catalog management.

2. Initialize the Recovery Catalog

Start RMAN, connect to the Catalog DB, and create the catalog features (table groups).

# Connect from the OS command line
# rcat_owner: Catalog username, catdb: Connection identifier for the Catalog DB
rman catalog rcat_owner/password_2026@catdb

-- Execute at the RMAN prompt
-- Creates management tables within the catalog schema
RMAN> CREATE CATALOG;

Registration and Use of the Target Database

Registering the Target Database (Register)

Make the database intended for backup recognized by the catalog.

# Connect to both the Target DB and the Catalog DB
rman target / catalog rcat_owner/password_2026@catdb

-- Register the Target DB information in the catalog
RMAN> REGISTER DATABASE;

Caution: If the DB is recreated (DBID changes), it must be registered again.

Execution Example: Backup and Management

After registration, simply performing a backup as usual will automatically synchronize the information to the catalog.

-- Perform a full backup
RMAN> BACKUP DATABASE PLUS ARCHIVELOG;

-- Verify backup history (Retrieves information from the catalog)
RMAN> LIST BACKUP;

Intent: By executing the LIST command, you can display a list of past history from the Catalog DB even if the control file has been lost.


Troubleshooting: Common ORA Errors

Error CodeCauseConfirmation / Solution
ORA-12154The connection identifier to the Catalog DB cannot be resolved.Check the tnsnames.ora settings.
RMAN-06004The Catalog DB is not open.Check the status of the Catalog DB and MOUNT/OPEN it.
RMAN-06428The Recovery Catalog is not installed.Execute the CREATE CATALOG command first.

Operational and Security Notes

  • Benefits and Risks:The benefit is management flexibility, but the disadvantage is that “the Catalog DB itself requires backups.” If the Catalog DB is corrupted, the latest backup information becomes unknown. Therefore, take measures such as enabling CONTROLFILE AUTOBACKUP for the Catalog DB itself.
  • Importance of Synchronization:While synchronization is usually automatic, if you manually manipulate the Target DB’s control file (such as deleting old logs via the OS), use the following command to ensure consistency:RMAN> RESYNC CATALOG;

FAQ: Frequently Asked Questions Regarding Recovery Catalog Procedures

Q: Is recovery impossible without a Recovery Catalog?

A: No, recovery is possible using only the control file. However, in worst-case scenarios where the control file is completely lost and there is no autobackup, having a catalog reduces the difficulty of restoration.

Q: Can I create the Catalog DB on the same server?

A: It is technically possible, but as there is a risk of losing both in a server failure, the best practice is to place it on a separate server (or a different OCI instance, etc.).

Q: What happens to the catalog when upgrading from 19c to 23ai?

A: You can upgrade the catalog schema version using the UPGRADE CATALOG command.


Summary

  • The Recovery Catalog is an “external database” that stores RMAN backup history.
  • It is effective for long-term retention, centralized management of multiple DBs, and protection against control file corruption.
  • Construction requires creating a dedicated user and running CREATE CATALOG.
  • Do not forget to back up the Catalog DB itself.

This article explains based on Oracle Database 19c (screens and default values may differ for other versions).

[reference]
Recovery Catalog Views

コメント

Copied title and URL