===========================================================
How to unregister a database from rman catalog
===========================================================
: rollingpig(http://rollingpig.itpub.net)
:2006.05.19 16:47
: Oracle collections
http://rollingpig.itpub.net/post/81/97230
---------------------------------------------------------------
:2006.05.19 16:47
: Oracle collections
http://rollingpig.itpub.net/post/81/97230
---------------------------------------------------------------
How to unregister a database from rman catalog
http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96566/rcmrepos.htm#442604
- Start RMAN and connect to the target database. Note down the DBID value that is displayed when you use RMAN to connect to the target database. For example, enter:
% rman TARGET / CATALOG rman/cat@catdb connected to target database: RDBMS (DBID=1237603294) connected to recovery catalog database
- List the copies and backup sets recorded in the repository (refer to "Listing RMAN Backups, Copies, and Database Incarnations"). For example, enter:
LIST BACKUP SUMMARY; List of Backups =============== Key TY LV S Device Type Completion Time #Pieces #Copies Tag ------- -- -- - ----------- --------------- ------- ------- --- 19 B A A DISK 08-FEB-02 1 1 TAG20020208T155239 20 B F A DISK 08-FEB-02 1 1 TAG20020208T155242 21 B A A DISK 08-FEB-02 1 1 TAG20020208T155331 22 B A A DISK 08-FEB-02 1 1 TAG20020208T155604
- Run
DELETEstatements to delete all existing physical backups (refer to "Deleting Backups and Copies"). For example:DELETE BACKUP DEVICE TYPE sbt; DELETE BACKUP DEVICE TYPE DISK;
RMAN will list the backups that it intends to delete and prompt for confirmation before deleting them.
- Use SQL*Plus to connect to the recovery catalog database as the catalog owner, then execute the following query in the recovery catalog to find the correct row of the
DBtable, settingDB_IDequal to the value you obtained from step 1. For example, enter:% sqlplus rman/cat@catdb SQL> SELECT DB_KEY, DB_ID FROM DB WHERE DB_ID = 1237603294;
This query should return exactly one row.
DB_KEY DB_ID ---------- ---------- 1 1237603294 1 row selected.
- While still connected to the recovery catalog, enter the following, where
DB_KEYandDB_IDare the corresponding columns from the row you got from the query in step 4:SQL> EXECUTE dbms_rcvcat.unregisterdatabase(db_key, db_id)
For example, enter:
SQL> EXECUTE dbms_rcvcat.unregisterdatabase(1, 1237603294)






