Oracle drop database – Can images stored in RMAN catalog be retained

oraclerman

It seems the default behavior when an Oracle database is dropped / deleted (entire server retired) that any RMAN entries for that system are also dropped.

Is it possible for RMAN to retain records for the dropped system until the "retention" is reached (removing backup pieces as they expire when stored on separate media) until all images are deleted (both from the RMAN catalog and media)?

Or does the original database have to be alive for this to happen?

The goal being to act like a backup product (NetBackup, CommVault, NetWorker, etc) where a catalog is retain independent of the state of the database. Though doing this all natively with Oracle tools.

Best Answer

It sounds like you need to set up a recovery catalog in a central database, which you can read up on how to set up a Recovery Catalog and maintain it from the Oracle Database 12c Docs.

Once you have the recovery catalog, then dropped database backup records are still maintained with their respective retention policies:

Connect to the recovery catalog:

sqlplus rman/ @catdb

Get the dbid for the database in question:

select dbid, name from rc_database order by name;

Point the recovery catalog to the database using the DBID from the previous query:

call dbms_rcvman.setdatabase(null,null,null,<DBID>,null);

List the backups for that database:

select * from rc_backup_files;