Database Reference
In-Depth Information
This statement must be the first statement of a transaction. If any transaction has not been rolled back or
committed before enabling PDML, the following error will be raised:
ORA-12841: Cannot alter the session parallel DML state within a transaction
Once a PDML statement has been executed, a rollback or commit must be issued before the table can be
modified again or queried within the same session. If the transaction is not committed or rolled back, subsequent
DML or queries against the table will report
ORA-12838: cannot read/modify an object after modifying it in parallel
Each slave process is considered a separate transaction. Therefore, they cannot see any uncommitted data from
other transactions, including the other slave processes currently working on the same parent transaction.
This is the reason that enabling PDML must be the first statement in a transaction. The coordinator processes
(created when connecting to the database) will also create a separate transaction. These processes will not be able to
see the data changed by the slave processes until it is committed; hence, the ORA-12838 error is raised when trying to
view or modify the table.
Parallel Recovery
In the case of a database crash, instance failure, media failure, and so forth, Oracle performs a recovery operation
against the respective files. Unless such recovery operation is complete, the database is not fully available to the user.
Parallel recovery divides the recovery operation by allocating different processes to different data blocks during
the cache recovery phase of recovery. One example of where this could be used is when applying redo information
from the redo logs. During recovery, the redo log is read and blocks that require application of redo log information are
parsed out. These blocks are subsequently distributed evenly to all recovery processes to be read into the buffer cache.
Based on the type of recovery, there are two methods by which parallel recovery is enabled:
Setting the
RECOVERY_PARALLELISM parameter to the number of concurrent recovery processes
for instance or crash recovery could enable parallel recovery. The value of this parameter
should be greater than 1 and should not exceed the value of the PARALLEL_MAX_SERVERS
initialization parameter. This parameter only supports recovery of instance or crash recovery.
Setting the
PARALLEL clause in the RECOVER DATABASE statement supports media recovery.
Parallel media recovery is controlled by the RECOVER_PARALLEL command that selects a degree
of parallelism equal to the number of CPUs available on all participating instances times the
value of the PARALLEL_THREADS_PER_CPU initialization parameter. For example, if parallel
recovery is performed with PARALLEL 4 and only one data file needs recovery, then four
spawned processes read blocks from the data file to apply.
Note
parallel recovery is discussed in detail in Chapter 10.
 
 
Search WWH ::




Custom Search