DBA Hub

📋Steps in this guide1/3

Unregister a Database From an RMAN Recovery Catalog

A step-by-step guide to unregistering unwanted databases from the RMAN catalog.

oracle miscconfigurationintermediate
by OracleDba
24 views
1

UNREGISTER DATABASE (Catalog and Database)

This option is available from Oracle 10g onward. If we still have access to the database we can start RMAN, connecting to both the target database and the catalog. We may wish to perform some clean-up first, like deleting the existing backups. When ready, we use the command.

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
rman target=sys/password@w2k1 catalog=rman/rman@catdb

RMAN> list backup summary;
RMAN> delete backup device type sbt;
RMAN> delete backup device type disk;

RMAN> unregister database;

OR

RMAN> unregister database noprompt;
2

UNREGISTER DATABASE (Catalog Only)

This option is available from Oracle 10g onward. If we no longer have access to the target database, we can still unregister it from the catalog using the command in RMAN. Start RMAN, connecting only to the catalog. Unregister the database by name. If there is more than one database in the catalog with the same name, we will need to use the DBID to identify the database to unregister. We can find this using the command. Once we have the DBID, we can unregister the database using the following commands.

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
rman catalog=rman/rman@catdb

RMAN> unregister database wk21 noprompt;

RMAN> list incarnation of database wk21;

set dbid 1312293510;

unregister database;
3

DBMS_RCVCAT (Catalog Only)

If we no longer have access to the target database, we can still unregister it from the catalog using the package in SQL. Connect to the catalog database using SQL*Plus, then query the and values as follows. The resulting and can then be used to unregister the database using the package. For more information see: Hope this helps. Regards Tim...

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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>

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

PL/SQL procedure successfully completed.

SQL>

Comments (0)

Please to add comments

No comments yet. Be the first to comment!