We have now restored the SPFILE and CONTROLFILE and started and mounted the database. Next thing we need to do is to restore the datafiles.
To restore datafile give the following command
RMAN> restore database;
When we give the above command RMAN will take some time to restore all the files.
Once the files are restored we now need to recover database by applying the transactions from archive log files
To perform recovery type the following command
RMAN> recover database;
When we give the recover database command RMAN will apply transaction from the archive log files and after applying the transaction from archive files it will try to apply transaction from the current log file. Since we have lost the current log file it will give an error as shown in the picture below.
At this point we can either open the database with RESETLOGS and we will lose the most recent transactions stored in the current log file
or
If you have at least one copy of the current log file
(from a mirror location) then we can apply the transactions from this
file so that we do not lose a singe transaction and database can be
completely recovered
Here in our case we don't have a copy of current logfile so we will just open the database by resetting the log files
To open the database by resetting the logfiles give the following command
RMAN> alter database open resetlogs;
This finishes our disaster recovery. You can now go to SQL Plus and see the contents of the database.
Interface Computers Academy © 2007-2017 All Rights Reserved