Oracle database recovery is the process of recovering oracle database from any failure like hard disk crash,server crash, humar error. It makes use of redo logs generated in the oracle database.
There are following recoveries
1)Instance Recovery
Oracle performs this recovery automatically . This happens in case of RAC when the surviving instance recovers the failed instance by using the redo logs to recover the committed data in the database buffers. Oracle also undo the uncommitted transactions using undo segments
2)Crash Recovery
Oracle performs this recovery automatically . This happens when all nodes of RAC went down or server crash or shutdown abort in case of single node.The crash recovery happens by using the redo logs to recover the committed data in the database buffers. Oracle also undo the uncommitted transactions using undo segments
3)Media Recovery
Media recovery requires the user to issue commands. This happen when lost the datafile or it got corrupted or redologs got corrupted
This also works by applying the redolog to recover the committed data in the database buffers. Oracle also undo the uncommitted transactions using undo segments
There are two types of media recovery
Complete Recovery
In this recovery, database can be recovered to the exact point of failure. It is called complete because Oracle applies all the redo changes to the backup
Incomplete Recovery
if a database can not be recovered to the most current time as we do not have sufficient archived redo logs, then database can be recovered to a point of time until we have the archived redo logs.
In case of incomplete recovery, the user can perform:
a)Tablespace point-in-time recovery (TSPITR), which enables users to recover one or more tablespaces to a point-in-time that is different
from the rest of the database.
b) Time-based recovery, also called point-in-time recovery (PITR), which recovers the data up to a specified point in time.
c)Cancel-based recovery, which recovers until the CANCEL command is issued.
d) Change-based recovery or log sequence recovery. If O/S commands are used, change-based recovery recovers up to a specified SCN in the redo record.
Important points
a)Recovery required the database backup so our strategy for backup should all the scenerio’s.
b) Recovery can be performed manually if we are not using RMAN for backup.
c) RMAN makes the recovery easiar.So it is recommended to use when possible