RMAN an introduction

RMAN Recovery

An Introduction:

RMAN  (Recovery Manager) recovery is based on SCN ( system change numbers) - they are an expression of linear date time expressions. They are also called technically the change vectors. which represents the time and transaction. The transaction means 

1. internal (recursive call) transactions also building metadata. 
2. application data transactions occupying the storage with the DML statements. 

RMAN when recovering the database looks for: 

a. the database ID coupled with current incarnation
b. sequence number of the archived redo log file/s
c. SCN numbers

Recovery is done to recover  

a. corrupt data blocks - if they are logical or physical and their recovery.
b. dropped segments - flashback based on the defined undo retention and undo tablespace. (undo tablespace with auto extend on      data files with undo retention or defined storage and undo retention).
c. lost datafile or accidentally dropped datafile or offline datafile recovery.
d. off line tablespace recovery
e. database recovery when all the files are ignorantly or innocently dropped (This is in my experience. a junior DBA deleted       all datafiles except redo logs and control file). Database can be recovered completely.which does NOT want any reset of the     database redo log sequence numbers
f. incomplete recovery (using backup contrlolfile or when all AL are NOT available or corrupt (for some reason)  if the            recovery is cancelled in the middle the database is to be opened using "resetlogs".
g. restoring "noarchivelog" databases.


RESETLOGS means resetting the sequence to the begining of the sequence for the ALs where and when the incarnation of the database changes.

When you "recreate controlfile" you are given an option with RESETLOGS and NORESETLOGS based on the recover done (incomplete or complete).                     

When we specify RESETLOGS if we want Oracle Database to ignore the contents of the files listed in the LOGFILE clause. These files do not have to exist. Each redo_log_file_spec in the LOGFILE clause must specify the SIZE parameter. The database assigns all online redo log file groups to thread 1 and enables this thread for public use by any instance. After using this clause, you must open the database using the RESETLOGS clause of the ALTER DATABASE statement.

If we want Oracle Database to use all files in the LOGFILE clause as they were when the database was last open. These files must exist and must be the current online redo log files rather than restored backups. The database reassigns the redo log file groups to the threads to which they were previously assigned and reenables the threads as they were previously enabled.