Backup Options   «Prev  Next»

Lesson 1

Oracle NOARCHIVELOG Database Recovery

If you are operating an Oracle database in `NOARCHIVELOG` mode, it implies that you are not archiving the redo logs. This mode restricts the types of recovery operations you can perform, specifically limiting you to only instance or crash recovery. You cannot perform point-in-time, media, or complete recoveries without restoring the entire database from a backup.
Given this limitation, the data structures required for Oracle `NOARCHIVELOG` database recovery are:
  1. Data Files: These files contain the actual data and are a crucial part of the database. When performing a recovery in `NOARCHIVELOG` mode, you'd typically restore the data files from the most recent full backup.
  2. Control File: This is a crucial file for any Oracle database. The control file contains metadata about the database, including the database's name, timestamp of database creation, information about data files and redo log files, and the log history. It is essential for synchronizing and coordinating all components of a database.
  3. Online Redo Log Files: In `NOARCHIVELOG` mode, only online redo logs are available. These logs record changes made to data, ensuring that these changes can be redone in case of an instance or system failure. During a crash recovery, Oracle will use the online redo log files to reapply changes made after the most recent backup to bring the database to a consistent state.
  4. Parameter File (pfile) or Server Parameter File (spfile): This is a configuration file that contains initialization parameters for the database instance. It's important for starting up an Oracle instance.
  5. System Global Area (SGA): Though not a persistent storage data structure, the SGA is a shared memory area containing data and control information for one database instance. The Redo Log Buffer, a component of the SGA, is especially relevant for recovery as it contains changes not yet written to the disk.

Given the restrictions of the `NOARCHIVELOG` mode, it's imperative to maintain regular full backups of the database, as these backups are the primary source of data recovery. In many production scenarios, it is advisable to consider operating in `ARCHIVELOG` mode instead, as it provides a more granular level of control and flexibility for recovery scenarios by archiving redo log files before they are overwritten. This allows for point-in-time recovery options. However, the choice largely depends on the specific requirements and acceptable levels of risk for your database environment.

This module introduces the concept of database recovery and the data structures required to achieve this. The methods for restoring and recovering a NOARCHIVELOG database are the focus of this module.
After completing this module, you will be able to:
  1. Identify data structures required for recovery
  2. Identify data structures required for restoring a NOARCHIVELOG database
  3. Describe the implications of media failure with a NOARCHIVELOG database
  4. Recover a NOARCHIVELOG database
  5. Restore files to a different location if media failure occurs
The next lesson describes the data structures required in a recovery process.

RMAN Backup, Restore and Recover the Noarchivelog Database

Oracle strongly recommends running the database in archivelog mode. If you do not run the database in archivelog mode, you cannot recover the database and apply changes to the restored datafiles due to missing archived redo log files. From RMAN, you cannot make a backup of the database when it is open. If you attempt to make a backup of the database when it is open, the following error will occur:

RMAN-03009: failure of backup command on ORA_DISK_1 channel at 7/21/2020 11:03:43

ORA-19602: cannot backup or copy active file in noarchivelog mode

Backup Database from mount stage

However, it is possible to backup the database from mount stage and even apply incremental backups and recover it to specific points in time. In the following scenario, we are going to perform the following steps to understand how the backup of the noarchivelog database could be restored and recovered.
  1. Backup the database running in noarchivelog mode
  2. Make some changes to the database and do an incremental backup
  3. Rename the folder which contains all physical files of the database
  4. Restore the backup and recover
Here are the steps in detail:
  1. Back up the database. Before implementing a backup, make sure you have configured RMAN to perform an automatic backup of the control file. It will help us to easily restore the control file.
  2. Connect to RMAN and run the following commands:

Oracle RMAN Backup and Recovery