Wednesday, August 7, 2013

RMAN-20001: target database not found in recovery catalog

Error: RMAN-20001: target database not found in recovery catalog

Details: This error occurs when attempting to backup the newly cloned database using RMAN

Cause:The database was not registered with recovery catalog.

Solution:Register the database with recovery catalog by performing the following steps:
  1. Set the environment to your target database:
    > . oraenv
    > DBName
  2. Connect to RMAN:
    > rman target /
  3. Connect to catalog as rman user:
    RMAN> connect catalog rmanuser/pwd@RMANDB
  4. Register target database:
    RMAN> register database;

The output will be:
database registered in recovery catalog
starting full resync of recovery catalog
full resync complete
Note: The database you are registering must not be a standby database, since standby database gets registered automatically whenever primary database is registered. Also the database must not be already registered in the recovery catalog. List of databases in recovery catalog can be retrieved byt loging in to RMAN repository and runnning:
select name, dbid from rc_database
where name=@DB_SID;