Comprehensive Management Guide for Recovery Catalog

English

The Recovery Catalog in Oracle Database’s Recovery Manager (Oracle RMAN) is a critical feature for the centralized management of backup information. This article provides a detailed explanation of the following three operations:

  • Unregistering a target database (How to remove unnecessary databases)
  • Resynchronizing the recovery catalog (How to keep backup information up to date)
  • Managing and executing stored scripts (Simplifying RMAN operations)

1. Unregistering a Target Database

To remove an unnecessary target database from the recovery catalog, use the UNREGISTER DATABASE command. It is important to note that performing this operation also deletes all associated backup information within the recovery catalog.

Data Management Execution Steps

  1. Connect to RMAN with the recovery catalog.SQLrman TARGET / CATALOG rman_user/password@catdb
  2. Execute the LIST INCARNATION command to check the registered databases.SQLLIST INCARNATION OF DATABASE;
  3. Execute the UNREGISTER DATABASE command to remove the target database.SQLUNREGISTER DATABASE;

Deleting a Specific Target Database Only

If multiple databases are registered, you can delete a specific one by specifying the DBID.

UNREGISTER DATABASE NOPROMPT;

Adding NOPROMPT allows you to delete the database without a confirmation prompt.

[oracle@restart ~]$ rman target / catalog rcuser/oracle@rcatalog

Recovery Manager: Release 19.0.0.0.0 - Production on Thu Feb 13 00:17:26 2026
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

Connected to target database: V19 (DBID=2960846808)
Connected to recovery catalog database

RMAN> LIST INCARNATION OF DATABASE;


List of Database Incarnations
DB Key  Inc Key DB Name  DB ID            STATUS  Reset SCN  Reset Time
------- ------- -------- ---------------- --- ---------- ----------
1       16      V19      2960846808       PARENT  1          19-04-17
1       2       V19      2960846808       CURRENT 1920977    24-01-05

RMAN> UNREGISTER DATABASE;

database name is "V19" and DBID is 2960846808

Do you really want to unregister the database (enter YES or NO)? yes
database unregistered from the recovery catalog

RMAN> LIST INCARNATION OF DATABASE;


RMAN>

2. Resynchronizing the Recovery Catalog

To update the recovery catalog information to the latest state, use the RESYNC CATALOG command. Performing this operation regularly ensures that the recovery catalog maintains the most recent backup information.

Execution Steps

  1. Connect to RMAN.SQLrman TARGET / CATALOG rman_user/password@catdb
  2. Execute the RESYNC CATALOG command.SQLRESYNC CATALOG;

When the synchronization of the recovery catalog is complete, the backup information and recoverable SCNs are updated to the latest versions.

[oracle@restart ~]$ rman target / catalog rcuser/oracle@rcatalog

Recovery Manager: Release 19.0.0.0.0 - Production on Thu Feb 13 00:20:06 2026
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

Connected to target database: V19 (DBID=2960846808)
Connected to recovery catalog database

RMAN> RESYNC CATALOG;

starting full resync of recovery catalog
full resync complete

3. Managing and Executing Stored Scripts

Stored scripts are only available when using a recovery catalog. It is not possible to save stored scripts in an RMAN configuration based solely on control files.

In RMAN, you can save frequently used backup and recovery commands as stored scripts and execute them easily. This improves task consistency and reduces manual errors.

Creating a Stored Script

  1. Connect to RMAN.SQLrman TARGET / CATALOG rman_user/password@catdb
  2. Create a script using the CREATE SCRIPT command.SQLCREATE SCRIPT full_backup { BACKUP DATABASE PLUS ARCHIVELOG; }
[oracle@restart ~]$ rman target / catalog rcuser/oracle@rcatalog

Recovery Manager: Release 19.0.0.0.0 - Production on Thu Feb 13 00:25:44 2026
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

Connected to target database: V19 (DBID=2960846808)
Connected to recovery catalog database

RMAN> CREATE SCRIPT full_backup { BACKUP DATABASE PLUS ARCHIVELOG; }

script full_backup created

Executing a Stored Script

To execute a saved script, use the following command:

RUN { EXECUTE SCRIPT full_backup; }
[oracle@restart ~]$ rman target / catalog rcuser/oracle@rcatalog

Recovery Manager: Release 19.0.0.0.0 - Production on Thu Feb 13 00:26:53 2026
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

Connected to target database: V19 (DBID=2960846808)
Connected to recovery catalog database

RMAN> RUN { EXECUTE SCRIPT full_backup; }  ★Executing stored script

executing script: full_backup


Starting backup at 26-02-13
Current log archived
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=105 device type=DISK
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=5 RECID=1 STAMP=1192924878
input archived log thread=1 sequence=6 RECID=2 STAMP=1192926425
channel ORA_DISK_1: starting piece 1 at 26-02-13
channel ORA_DISK_1: finished piece 1 at 26-02-13
piece handle=/u01/app/oracle/product/19.0.0/dbhome_1/dbs/013hl76t_1_1 tag=TAG20250213T002709 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:07
Finished backup at 26-02-13

Starting backup at 26-02-13
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=+DATA/V19/DATAFILE/system.257.1157469475
input datafile file number=00003 name=+DATA/V19/DATAFILE/sysaux.258.1157469511
input datafile file number=00004 name=+DATA/V19/DATAFILE/undotbs1.259.1157469525
input datafile file number=00007 name=+DATA/V19/DATAFILE/users.260.1157469527
channel ORA_DISK_1: starting piece 1 at 26-02-13
channel ORA_DISK_1: finished piece 1 at 26-02-13
piece handle=/u01/app/oracle/product/19.0.0/dbhome_1/dbs/023hl778_1_1 tag=TAG20250213T002717 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:25
Finished backup at 26-02-13

Starting backup at 26-02-13
Current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=7 RECID=3 STAMP=1192926465
channel ORA_DISK_1: starting piece 1 at 26-02-13
channel ORA_DISK_1: finished piece 1 at 26-02-13
piece handle=/u01/app/oracle/product/19.0.0/dbhome_1/dbs/033hl784_1_1 tag=TAG20250213T002748 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 26-02-13

Starting Control File and SPFILE Autobackup at 26-02-13
piece handle=/u01/app/oracle/product/19.0.0/dbhome_1/dbs/c-2960846808-20250213-00 comment=NONE
Finished Control File and SPFILE Autobackup at 26-02-13

Listing Stored Scripts

To check the scripts you have created, use the following command:

LIST SCRIPT NAMES;
RMAN>LIST SCRIPT NAMES;

List of Stored Scripts in Recovery Catalog


    Scripts for Target Database V19

       Script Name
       Description
       -----------------------------------------------------------------------
       full_backup

Deleting a Stored Script

Scripts that are no longer needed can be deleted with the following command:

DELETE SCRIPT full_backup;
RMAN> DELETE SCRIPT full_backup;

script full_backup deleted

RMAN> LIST SCRIPT NAMES;

List of Stored Scripts in Recovery Catalog

        no scripts in recovery catalog

Examples of Using Stored Scripts

  • Regular full backups
  • Scheduling incremental backups
  • Backing up specific data files only

These practices enable operational efficiency and ensure consistency.


Summary

In this article, we have explained the essential operations for managing a recovery catalog.

  • Unregistering a target database: Use UNREGISTER DATABASE
  • Resynchronizing the recovery catalog: Maintain the latest state with RESYNC CATALOG
  • Managing stored scripts: Create scripts to perform backups efficiently

By utilizing these operations appropriately, database backup management becomes simpler and more secure.

(Target Version: 19c)

[reference]
Recovery Catalog Views

コメント

Copied title and URL