Search notes:

Oracle backup and recovery

A backup needs to include all crucial parts of a database:

Whole and partial database backup

A whole database backup is a backup of
Partial database backup only backs up a limited subset of the data such as

Consistent and inconsistent backups

A whole database backup is either consistent or inconsistent.

Consistent backup

In a consistent backup, all (read/write) data files and control files have the same checkpoint SCN. This guarantees that the files contain all changes up to this SCN.
A consistent backup can only be taken after a consistent shutdown.
After restoring a consistent backup, recovery is not required.
Databases running in noarchivelog mode can only be (securly) backed up in a consistent fashion because they need recovery after restoration and recovery is only possible with archived redo log files.

Image copies and backup sets

An image copy is an exact copy of data files, control files and archived redo log files.
A backup set is a backup in a propriety format.
Image copies can be created with either RMAN or operating system utilities. Backup set can only be created with RMAN.

Data file recovery

Data file recovery repairs a lost or damaged current data file or control file.
It can also recover lost data changes after a tablespace went offline without the offline normal option.
In order to perform data file media recovery,

Instance recovery

Instance recovery automatically applies changes to online files

Tools available for backup and recovery

Some tools that are needed for backup and recovery are
It is also possible, but probably very cumbersome, to devise a solution that does backup and recovery with an array of shell scripts and SQL*Plus recover commands.
The preferred solution for backup and recovery is RMAN.

Complete and incomplete recovery

Complete recovery

Complete recovery applies all redo log changes of archived log files and the online redo logs to a backup.
Compleate recovery is usually performed after a media failure.
Complete recovery is possible on
  • databases
  • tablespaces
  • data files

Incomplete recovery

An incomplete recovery only applies a part of the available redo log.
An imcomplete recovery is usually performed after a human error.
In order to perform an incomplete recovery, a backup must be found that is older than the time to which the recovery is intended to be done. Then, the database needs to opened with the resetlogs option (to reset the logs which creates a new stream of log sequence numbers starting with 1).
Incomplete recovery is also referred to as database point in time recovery (DBPITR). Flashback Database might be an alternative to DBPITR if current data files are available.

Data Recovery Advisor

The Data Recovery Advisor

Alternatives to RMAN

Some (limited) alternatives to RMAN are

See also

RMAN
Database: backup and recovery

Index