SEARCH

Google

Tuesday, October 2, 2007

ORACLE DATABASE RECOVERY

There are several circumstances that can halt the operation
of an Oracle database. The most common are :


User errors - User errors whether data entry or alterations causing
invalid or incorrect data, can require a database to be recovered to
a point in time before the error occurred.

For example, a user might accidentally drop a table, causing the database
to need to be restored to a point in time just before this happened.




Instance failure - This occurs when a problem arises which prevents
an instance (SGA and background process) from continuing work.
This is usually due to a power failure, a SHUTDOWN ABORT statement,
a STARTUP FORCE statement, or possibly an operating system crash.
When this happen, data that is stored in the SGA buffers is not written
to disc. This type of failure requires instance recovery and is done
automatically by Oracle at instance startup by applying Redo logs to
recover the committed data in the SGA.


Media failure - This occurs anytime there is a failure to read or write
data to disc. This is usually caused by a disc head crash which causes
loss of some or all files on the drive. Different Oracle files
(Data, Control, Redo) may be affected and the particular file type may
require different types of recovery. Also, since the instance cannot
execute properly, data in it's buffers is not written to disc.
This type of failure requires media recovery which entails restoring
backup files so that information in them corresponds to the most recent
time prior to the disk failure including committed data in memory.


Statement errors - These errors are usually caused by improperly encoded
SQL statements and their effects on data are typically undone by oracle
before control is returned to the user.


Process failure - This occurs when a process aborts prematurely. The
oracle process PMON detects this halt and rolls back the uncommitted
transactions before releasing resources held by that process.

System Data Recovery

The final goal of the Data Recovery process is to ensure
that all committed transactions prior to the database failure
are fully recovered and are reflected once the instance
is re-started.

To initiate a data base recovery,some pre-recovery steps
should be completed

1. Identifying the type of error and determining a fast and
effective action to take. Most common errors are:

- User
- Process
- Instance
- Media

2. Risk Measure : identifying the risks associated with the
database failure ( Business data loss )

3. Identification of Data Recovery Mode