Oracle Restoring and Recovering


The “recovery” portion of backup and recovery tasks includes two major types of activities: restoring and recovering. Restoring a file is the process of copying a backup into place to be used by the database. This is necessary if, for example, a file is damaged because the physical disk it is on fails. This is usually due to hardware problems, such as disk write errors, or controller failure. In that case, a backup of the file needs to be copied onto a new (or repaired) disk.

Recovering the file entails applying redo such that the state of the file is brought forward in time, to whatever point you want. That point is usually as close to the time of failure as possible.

In the database industry, these two operations are often referred to, collectively, with the single term “recovery.”

Causes of File Loss
Files can be lost or damaged due to:
        User error: An administrator may inadvertently delete or copy over a necessary operating system file.
        Application error: An application or script can also have a logic error in it, as it processes database files, resulting in a lost or damaged file.
        Media failure: A disk drive or controller may fail fully or partially, and introduce corruption into files, or even cause a total loss of files.

Critical Versus Noncritical
A noncritical file is one that the database and most applications can operate without. For example, if the database loses one multiplexed redo log file, there are still other redo log file copies that can be used to keep the database operating.

Although the loss of a noncritical file does not cause the database to crash, it can impair the functioning of the database. For example:
        The loss of an index tablespace can cause applications and queries to run much slower, or even make the application unusable, if the indexes were used to enforce constraints.
        The loss of an online redo log group, as long as it is not the current online log group, can cause database operations to be suspended until new log files are generated.
        The loss of a temporary tablespace can prevent users from running queries or creating indexes until they have been assigned to a new temporary tablespace.

You fix the problem by taking one of these actions:
        Create a new file.
        Rebuild the file.
        Recover the lost or damaged file.