Oracle 8i | Oracle 9i | Oracle 10g | Oracle 11g | Oracle 12c | Miscellaneous | PL/SQL | SQL | Oracle RAC | Oracle Apps | Linux

Unregister a Database From an RMAN Recovery Catalog

There are multiple ways to unregister a database from an RMAN recovery catalog.

UNREGISTER DATABASE (Catalog and Database)

This option is available from Oracle 10g onward. If you still have access to the database you can start RMAN, connecting to both the target database and the catalog.

rman target=sys/password@w2k1 catalog=rman/rman@catdb

You may wish to perform some clean-up first, like deleting the existing backups.

RMAN> LIST BACKUP SUMMARY;
RMAN> DELETE BACKUP DEVICE TYPE SBT;
RMAN> DELETE BACKUP DEVICE TYPE DISK;

When ready, use the UNREGISTER DATABASE command.

RMAN> UNREGISTER DATABASE;

OR

RMAN> UNREGISTER DATABASE NOPROMPT;

UNREGISTER DATABASE (Catalog Only)

This option is available from Oracle 10g onward. If you no longer have access to the target database, you can still unregister it from the catalog using the UNREGISTER DATABASE command in RMAN.

Start RMAN, connecting only to the catalog.

rman catalog=rman/rman@catdb

Unregister the database by name.

RMAN> UNREGISTER DATABASE wk21 NOPROMPT;

If there is more than one database in the catalog with the same name, you will need to use the DBID to identify the database to unregister. You can find this using the LIST INCARNATION command.

RMAN> LIST INCARNATION OF DATABASE wk21;

Once you have the DBID, you can unregister the database using the following script.

RUN
{  
  SET DBID 1312293510;
  UNREGISTER DATABASE wk21 NOPROMPT;
}

DBMS_RCVCAT (Catalog Only)

If you no longer have access to the target database, you can still unregister it from the catalog using the DBMS_RCVCAT package in SQL.

Connect to the catalog database using SQL*Plus, then query the DB_KEY and DBID values as follows.

SQL> CONNECT rman/rman@catdb
Connected.
SQL> SELECT db_key, dbid, name FROM rc_database WHERE name = 'W2K1';

    DB_KEY       DBID NAME
---------- ---------- --------
     23085 1312293510 W2K1

1 row selected.

SQL>

The resulting DB_KEY and DBID can then be used to unregister the database using the DBMS_RCVCAT package.

SQL> EXECUTE dbms_rcvcat.unregisterdatabase(23085 , 1312293510);

PL/SQL procedure successfully completed.

SQL>

For more information see:

Hope this helps. Regards Tim...

Back to the Top.