A full restore is only something being done after all other options has been exhausted, because there will be loss of data.
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:
-rw-r--r-- 1 oracle oinstall 222940 Apr 5 20:16 2017-04-05-ARCH-CDRATOR.log
-rw-r--r-- 1 oracle oinstall 957155 Apr 5 23:53 2017-04-05-FULL-CDRATOR.log
-rw-r--r-- 1 oracle oinstall 221481 Apr 6 20:16 2017-04-06-ARCH-CDRATOR.log
-rw-r--r-- 1 oracle oinstall 961216 Apr 6 23:53 2017-04-06-FULL-CDRATOR.log
-rw-r--r-- 1 oracle oinstall 58713 Apr 7 11:16 2017-04-07-ARCH-CDRATOR.log
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.
On the line below the file name is the SCN (System Change Number). In this example a bit covered but readable as 10825040664713.
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/recover operation
RMAN> configure device type disk parallelism 8; RMAN> run { 2> set until SCN 10825040664713; 3> restore database; 4> recover database; 5> }
And now there is time for one or more cups of coffee !!!!
Open up the database
If the restore and recover completed without any warnings and errors, you can open the database.
RMAN> alter database open resetlog;