DB version: 19c
OS : RHEL 8.4
My shop uses RMAN catalog.
I wanted to list all the databases registered with this catalog.
So, I used RC_DATABASE view which should list all the databases registered in the recovery catalog.
But, for some DBs, I see multiple DBIDs but only one of them is the real one. I think the orphan ones from incarnations.
For example, in the output below, CDB_PRD7 database has several rows in RC_DATABASE view. But, the real DB ID is 1226793442.
$ sqlplus rman_ctg/Tiger#284@10.80.16.218:1521/DB_RMAN.domain.net
SQL> select name, DB_KEY, DBINC_KEY, DBID from rc_database order by name asc;
NAME DB_KEY DBINC_KEY DBID
-------- ---------- ---------- ----------
CDB_PRD1 495823889 495823890 1642825607
CDB_PRD2 512068653 576491369 2130976890
CDB_PRD3 530729762 530729763 2196262551
.
.
.
CDB_PRD7 539937060 539937061 1129388132
CDB_PRD7 596187845 596187846 1182470077
CDB_PRD7 650817926 650817927 1234042941
CDB_PRD7 645860123 645860124 1226793442 ---> But, this is real DBID see in v$database view of the database.
CDB_PRD7 122289290 122289291 1063889109
CDB_PRD7 628202393 628202394 1209702847
CDB_PRD7 520244176 520244177 1109278387
CDB_PRD7 545158676 545158677 1134576214
Question1. Why are there multiple DBIDs for a database in RC_DATABASE view ? Does each incarnation create a DBID ?
Question2. Can I remove the 'orphan' entries in RMAN catalog using the following commands ?
RMAN> set DBID 1063889109;
RMAN> UNREGISTER DATABASE NOPROMPT;