On one of our boxes, we start to get the error stack below when we want to do a crosscheck with catalog database in use.
RMAN>crosscheck archivelog all; released channel: ORA_DISK_1 allocated channel: ORA_DISK_1 channel ORA_DISK_1: sid=357 devtype=DISK RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03009: failure of crosscheck command on ORA_DISK_1 channel at 11/26/2009 15:08:05 ORA-19633: control file record 8403 is out of sync with recovery catalog RMAN>resync catalog; starting full resync of recovery catalog RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03008: error while performing automatic resync of recovery catalog ORA-02291: integrity constraint (RMAN.RLH_F1) violated - parent key not found
I unregistered the DB and register it but after it tries to resync the catalog during registration, error came up like below .
RMAN>unregister database; database unregistered from the recovery catalog RMAN>register database database registered in recovery catalog starting full resync of recovery catalog RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03008: error while performing automatic resync of recovery catalog ORA-02291: integrity constraint (RMAN.RLH_F1) violated - parent key not found
I could not find a metalink note, but a working solution from forums.oracle.com
Basically, you need to run unregister it by running undocumented internal (Update: I did not check metalink it is documented in 1058332.6)!!!!! DBMS_RCVCAT.UNREGISTERDATABASE procedure on RMAN catalog DB. (ask Oracle support before you start doing something)
SQL> select 'EXEC DBMS_RCVCAT.UNREGISTERDATABASE('||DB_KEY||','||DBID||');' 3 command, resetlogs_time 4 from rc_database 5 where name = '&db_name'; Enter value for db_name: XXXXXX COMMAND RESETLOGS_TIME ------------------------------------------------------------ ----------------- EXEC DBMS_RCVCAT.UNREGISTERDATABASE(5626305,201074392); 20071130 11:57:12
Run the command if the resetlogs time is right and it will unregister your database from catalog.
Re-register your DB ( RMAN>register database) , if you are lucky as me it will register and sync the catalog without a problem.