Lesson 4 | Specifying parallel recovery operations |
Objective | Explain how parallel recovery works. |
Specifying Parallel Recovery Operations
Parallel recovery significantly reduces recovery time and minimizes database downtime in situations where recovery cannot be performed while the database is open. During serial recovery, changes that were generated by several concurrent processes are applied sequentially to the datafile. Therefore, if there are a large number of changes to apply, media recovery can take longer than the time it took to initially generate these changes. However, parallel recovery applies these changes
simultaneously from a redo log file to different datafiles, thus saving time.
Steps of Parallel Recovery
Parallel recovery can be performed either manually or automatically. To manually perform a parallel recovery, you simply start several Server
Manager sessions and issue the RECOVER DATAFILE <datafile_name>
command on different datafiles in each session.
This method is not efficient because each session has to read the entire redo log file. Therefore, automatic parallel recovery is the preferred procedure. In the rest of the course, whenever parallel recovery is mentioned, it will refer to automatic parallel recovery as shown in the parallel-records below.
Steps Parallel Alternative Concurrency Mechanisms
Specifying parallel recovery
There are two ways to specify parallel recovery:
- Set the
RECOVERY_PARALLELISM
parameter in the parameter file for your database and restart the database with this parameter file;
- Specify the
PARALLEL
recover-parallel-clause in the
RECOVER DATABASE
command.
The RECOVERY_PARALLELISM
parameter determines the default number of recovery processes per session if there is no PARALLEL
clause specified in the RECOVER
command. For most media recovery situations, Oracle recommends you set the parameter for one or two recovery processes for each disk containing datafiles. When you set the value for the RECOVERY_PARALLELISM
parameter in the
initSID.ora file, pay attention to the following guidelines:
- The value must be greater than 1
- The value cannot be greater than the value of another initialization parameter
PARALLEL_MAX_SERVERS (which specifies the number of parallel server processes for an instance)
You can also start a parallel recovery by specifying the PARALLEL
clause in the RECOVER
command like this:
SVRMGR> RECOVER DATABASE PARALLEL (DEGREE 2);
The value specified in the PARALLEL
clause above overrides the value of the RECOVERY_PARALLELISM
parameter.
The next lesson demonstrates how to reconstruct a lost or corrupted control file.
Quiz
Click the Quiz link below to review your understanding of minimizing database downtime.
Minimize Database Downtime - Quiz