Starting point
The starting point is that the entire database is either deleted or corrupted, but the basic directory structure is in place:
admin/$ORACLE_SID FRA/$ORACLE_SID oradata/$ORACLE_SID/controlfile oradata/$ORACLE_SID/datafile oradata/$ORACLE_SID/onlinelog
In the directory backup/logs
you can find the log from the last backup:
Find DBID of database
From that logfile, you can find the start of the last backup, where you can find the DBID of the database.
In this case the ORACLE_SID is CDRATOR and the DBID is 20141184369.
Find SPFILE backup
In the logfile, at the very end, the name of backup file holding the SPFILE is found.
Find Controlfile backup
In the logfile, in the section above, the name of the backup file holding the CONTROLFILE is found.
Restore SPFILE from backup
The following commands shall be executed:
SH> export ORACLE_SID=CDRATOR SH> cd $ORACLE_BASE/backup/$ORACLE_SID SH> rman target / RMAN> set dbid=20141184369; RMAN> startup nomount; RMAN> restore spfile from '/opt/oracle/backup/CDRATOR/20170328-ARCH-l4s08qf6_1_1'; RMAN> shutdown immediate;
Restore Controlfile from backup
RMAN> set dbid=20141184369; RMAN> startup nomount; RMAN> restore controlfile from '/opt/oracle/backup/CDRATOR/20170328-ARCH-l3s08qf2_1_1'; RMAN> shutdown immediate;
Catalog the backup files
RMAN> set dbid=20141184369; RMAN> startup mount; RMAN> catalog start with '/opt/oracle/backup/CDRATOR/' noprompt;
Start the restore operation
RMAN> configure device type disk parallelism 8; RMAN> restore database;
And now there is time for one or more cups of coffee !!!!
Start the recover operation
RMAN> recover database; RMAN> alter database open resetlog;