Target Database is Still Available
You connect to the target database TEST and then unregister it:
rman TARGET SYS/Passwd@TEST CATALOG rman/rman@catdb
RMAN> UNREGISTER DATABASE NOPROMPT;
Unregistering a Database That is Not Unique in Catalog or Target Database is Unvailable
The following UNIX shell script unregisters database testdb from the recovery catalog. Because multiple databases called testdb are registered in the recovery catalog, and because RMAN is not connected to the target database (which has already been deleted from the file system), you must run SET DBID:
Show DBID of a database:
RMAN > list incarnation of database testdb;
rman CATALOG rman/rman@catdb RMAN> RUN { SET DBID 1334531173; # specifies test database by DBID UNREGISTER DATABASE testdb NOPROMPT; }
List all Registered Database
RMAN > LIST DB_UNIQUE_NAME ALL;