Oracle® Database Backup and Recovery Advanced User's Guide 10g Release 2 (10.2) Part Number B14191-02 |
|
|
View PDF |
Restore of a database running in NOARCHIVELOG mode is very similar to restore of a database in ARCHIVELOG mode. The main differences are:
Only cold backups (that is, backups created when the database was shut down normally) can be used in restoring a database in NOARCHIVELOG mode
Media recovery is not possible, because there are no archived logs
A limited form of restore and recovery is possible for NOARCHIVELOG databases if the backup strategy for the database includes incremental backups. The incremental backups (which, like the full backup of a NOARCHIVELOG database must be created when the database is shut down) can be applied to a full database backup to apply recent changes up to the time of the incremental backup.
You can perform limited recovery of changes to a database running in NOARCHIVELOG
mode by applying incremental backups. Note that the incremental backups must be consistent, like all backups of a database run in NOARCHIVELOG
mode, so you cannot make backups of the database when it is open.
Assume the following scenario:
You run database trgt
in NOARCHIVELOG
mode.
You use a recovery catalog.
You shut down the database consistently and make a level 0 backup of database trgt
to tape on Sunday afternoon.
You shut down the database consistently and make a level 1 differential incremental backup to tape at 3:00 a.m. on Wednesday and Friday.
The database has a media failure on Saturday, destroying half of the datafiles as well as the online redo logs.
In this case, you must perform an incomplete media recovery until Friday, the date of the most recent incremental backup. RMAN uses the level 0 Sunday backup as well as the Wednesday and Friday level 1 backups.
Because the online redo logs are lost, you must specify the NOREDO
option in the RECOVER
command.
You must also specify NOREDO
if the online logs are available but the redo cannot be applied to the incrementals.
If you do not specify NOREDO
, then RMAN searches for redo logs after applying the Friday incremental backup, and issues an error message when it does not find them.
After connecting to trgt
and the catalog database, recover the database with the following command:
STARTUP FORCE MOUNT; RESTORE CONTROLFILE; # restore control file from consistent backup ALTER DATABASE MOUNT; RESTORE DATABASE; # restore datafiles from consistent backup RECOVER DATABASE NOREDO; # specify NOREDO because online redo logs are lost ALTER DATABASE OPEN RESETLOGS;
The recovered database reflects only changes up through the time of the Friday incremental backup. Because there are no archived redo logs, there is no way to recover changes made after the incremental backup.
Note:
If the current online logs contain all changes since the last incremental , then you can run RECOVER DATABASE without specifying NOREDO. In such a case, the changes in the online logs are applied.