Database Reference
In-Depth Information
will want to restore your database to a specific SCN. This is supported during recovery opera-
tions. Also, Oracle's Flashback features support the use of the SCN when flashing back the
database. See Chapter 8 for more information on the vast number of features available with
Oracle Flashback Database.
Instance Recovery There are two different flavors of instance recovery: instance recovery
and crash recovery. Instance recovery is associated with the crash of the entire database,
including all of its instances, and the recovery of the database after that crash. Crash recovery
occurs when a RAC database node fails, and the other nodes recover the transactions of the
failed node. In the context of the Oracle OCP exam, you will need to understand instance
recovery and how to tune the database to reduce the time it takes to do instance recovery.
You will not need to be concerned with crash recovery.
Understanding and controlling the time it takes to perform instance recovery is important
because your customers may require that you adhere to specific requirements with respect
to how long it takes your database to open after it has crashed (say, for example, because
of power loss). The maximum time allowed for your database to come back up is typically
called the recovery time objective (RTO).
When starting the database, Oracle will check the SCN in each individual data file against
what is called the checkpoint SCN in the database control file. The checkpoint SCN is a num-
ber that represents the SCN recorded after the completion of the last successful checkpoint.
If the SCNs are all the same when the database is started, then no instance recovery is required
and the database is opened. This is the quickest way to get an Oracle database open.
If the SCNs in the data files differ from the checkpoint SCN in the control file, then instance
recovery will be required. Instance recovery occurs in two stages. The first is cache recovery,
where Oracle will apply the changes from the online redo logs, including any that might be
recorded in the online redo logs that are not committed. Cache recovery is the portion of
instance recovery that you need to tune because this is the process that is keeping the data-
base from opening.
Once cache recovery is complete, Oracle will open the database and start the second stage
of instance recovery, called transaction recovery. During transaction recovery, Oracle will
roll back any uncommitted transactions that were applied during cache recovery. However,
the database is open and fully functional.
As you might expect, as the version of the data on disk diverges from the version of the
data at the current point in time, the time to perform instance recovery increases. While
this improves performance at run time, it can also negatively impact performance during
instance recovery. This balancing act between instance recovery and database performance
is managed by Oracle's Fast-Start Fault Recovery feature, which we will discuss next.
Fast-Start Fault Recovery Fast-Start Fault Recovery provides ways to adjust DBW so that
it will maintain write IO at a rate sufficient to maintain a specific target RTO while also
enabling maximum database performance. Thus, you balance the frequency of DBW writing
against the time it takes to do instance recovery.
Search WWH ::




Custom Search