However, other copies of the
current control file are available on different disks, so an instance can be
restarted easily without the need for database recovery.
The permanent loss of all copies of a database’s control file is a serious problem to safeguard against. If all control files of a database are permanently lost during operation (several disks fail), the instance is aborted and media
recovery is required. Even so, media recovery is not straightforward if an older backup of a control file must be used because a current copy is not available.
Therefore, it is strongly recommended that multiplexed control files be used
with each database, with each copy stored on a different physical disk.
Database Recovery 27-19
Database Backups
No matter what backup and recovery scheme you devise for an Oracle
database, backups of the database’s datafiles and control files are absolutely necessary as part of the strategy to safeguard against potential media failures that can damage these files.
The following sections provide a conceptual overview of the different types of backups that can be made and their usefulness in different recovery schemes.
The Oracle8 Server Backup and Recovery Guide provides more details, along with guidelines for performing database backups.
Whole Database Backups
A whole database backup is an operating system backup of all datafiles and the control file that constitute an Oracle database. A whole backup should also
include the parameter file(s) associated with the database. You can take a
whole database backup when the database is shut down or while the database
is open. You should not normally take a whole backup after an instance failure or other unusual circumstances.
Consistent Whole Backups vs. Inconsistent Whole Backups
Following a clean shutdown, all of the files that constitute a database are
closed and consistent with respect to the current point in time. Thus, a whole backup taken after a shutdown can be used to recover to the point in time of
the last whole backup. A whole backup taken while the database is open is not
consistent to a given point in time and must be recovered (with the online and archived redo log files) before the database can become available.
Backups and Archiving Mode
The datafiles obtained from a whole backup are useful in any type of media
recovery scheme:
•
If a database is operating in NOARCHIVELOG mode and a disk failure
damages some or all of the files that constitute the database, the most
recent consistent whole backup can be used to restore (not recover) the database.
Because an archived redo log is not available to bring the database up to
the current point in time, all database work performed since the backup
must be repeated. Under special circumstances, a disk failure in
NOARCHIVELOG mode can be fully recovered, but you should not
rely on this.
27-20 Oracle8 Server Concepts
•
If a database is operating in ARCHIVELOG mode and a disk failure
damages some or all of the files that constitute the database, the datafiles
collected by the most recent whole backup can be used as part of
database recovery.
After restoring the necessary datafiles from the whole backup, database
recovery can continue by applying archived and current online redo log
files to bring the restored datafiles up to the current point in time.
In summary, if a database is operated in NOARCHIVELOG mode, a consistent
whole database backup is the only method to partially protect the database
against a disk failure; if a database is operating in ARCHIVELOG mode, either
a consistent or an inconsistent whole database backup can be used to restore
damaged files as part of database recovery from a disk failure.
Partial Database Backups
A partial database backup is any backup short of a whole backup, taken while the database is open or shut down. The following are all examples of partial
database backups:
•
a backup of all datafiles for an individual tablespace
•
a backup of a single datafile
•
a backup of a control file
Partial backups are only useful for a database operating in ARCHIVELOG
mode. Because an archived redo log is present, the datafiles restored from a
partial backup can be made consistent with the rest of the database during
recovery procedures.
Datafile Backups
A partial backup includes only some of the datafiles of a database. Individual or collections of specific datafiles can be backed up independently of the other datafiles, online redo log files, and control files of a database. You can back up a datafile while it is offline or online.
Choosing whether to take online or offline datafile backups depends only on
the availability requirements of the data — online datafile backups are the
only choice if the data being backed up must always be available.
Control File Backups
Another form of a partial backup is a control file backup. Because a control file keeps track of the associated database’s physical file structure, a backup of a Database Recovery 27-21
database’s control file should be made every time a structural change is made to the database.
|