Saturday, February 03, 2007

Unregister database GENQA from RMAN catalog database



1. Obtain DBID of the database

rman target / nocatalog
Recovery Manager: Release 8.1.7.4.0 - Production
RMAN-06005: connected to target database: GENQA (DBID=514069585)
RMAN-06009: using target database controlfile instead of recovery catalog


2. List copies and backup sets recorded in the control file

RMAN> list backup of database;


3. Issue change ... delete statement

RMAN> allocate channel for maintenance type disk;
RMAN> change backupset 989 delete;


4. Execute another list command to confirm that RMAN removed all backups

Note: following two statements maybe executed:

RMAN> crosscheck backupset;
RMNA> delete expired backupset;


5. Use SQL*Plus to connect to the recovery catalog database and execute the
following query in the recovery catalog to find the correct row of the DB table,
setting DB_ID equal to the value you obtained from step 1. For example, enter:

rman@CATALOGDB> select db_key, db_id from db where db_id=514069585;


DB_KEY DB_ID
---------- ----------
4656927 514069585


6. While still connected to the recovery catalog, enter the following:

rman@CATALOGDB> EXECUTE dbms_rcvcat.unregisterdatabase(4656927, 514069585);
PL/SQL procedure successfully completed.

No comments: