Which two are true concerning the use of this code?

Examine the following anonymous PL/SQL code block of code:

Which two are true concerning the use of this code?

Examine the following anonymous PL/SQL code block of code:

Which two are true concerning the use of this code?

A.
The user executing the anonymous PL/SQL code must have the CREATE JOB system
privilege.

B.
ALTER SESSION ENABLE PARALLEL DML must be executed in the session prior to
executing the anonymous PL/SQL code.

C.
All chunks are committed together once all tasks updating all chunks are finished.

D.
The user executing the anonymous PL/SQL code requires execute privilege on the DBMS_JOB
package.

E.
The user executing the anonymous PL/SQL code requires privilege on the
DBMS_SCHEDULER package.

F.
Each chunk will be committed independently as soon as the task updating that chunk is
finished.

Explanation:
A (not D, not E):
To use DBMS_PARALLEL_EXECUTE to run tasks in parallel, your schema will need the CREATE
JOB system privilege.
E (not C): DBMS_PARALLEL_EXECUTE now provides the ability to break up a large table

according to a variety of criteria, from ROWID ranges to key values and user-defined methods.
You can then run a SQL statement or a PL/SQL block against these different “chunks” of the table
in parallel, using the database scheduler to manage the processes running in the background.
Error logging, automatic retries, and commits are integrated into the processing of these chunks.
Note:
* The DBMS_PARALLEL_EXECUTE package allows a workload associated with a base table to
be broken down into smaller chunks which can be run in parallel. This process involves several
distinct stages.
1.Create a task
2.Split the workload into chunks
CREATE_CHUNKS_BY_ROWID
CREATE_CHUNKS_BY_NUMBER_COL
CREATE_CHUNKS_BY_SQL
3.Run the task
RUN_TASK
User-defined framework
Task control
4.Check the task status
5.Drop the task
* The workload is associated with a base table, which can be split into subsets or chunks of rows.
There are three methods of splitting the workload into chunks.
CREATE_CHUNKS_BY_ROWID
CREATE_CHUNKS_BY_NUMBER_COL
CREATE_CHUNKS_BY_SQL
The chunks associated with a task can be dropped using the DROP_CHUNKS procedure.
* CREATE_CHUNKS_BY_ROWID
The CREATE_CHUNKS_BY_ROWID procedure splits the data by rowid into chunks specified by
the CHUNK_SIZE parameter. If the BY_ROW parameter is set to TRUE, the CHUNK_SIZE refers
to the number of rows, otherwise it refers to the number of blocks.
Reference: TECHNOLOGY: PL/SQL Practices, On Working in Parallel



Leave a Reply 3

Your email address will not be published. Required fields are marked *


raka

raka

For me answers are:

“A” because “To execute chunks in parallel, the user must have CREATE JOB system privilege.”
http://docs.oracle.com/cd/E11882_01/appdev.112/e40758/d_parallel_ex.htm#ARPLS67332

“F” because “Run a user specified statement on these chunks in parallel, and commit when finished processing each chunk”
http://docs.oracle.com/cd/E11882_01/appdev.112/e40758/d_parallel_ex.htm#ARPLS67330

raka

raka

“Your comment is awaiting moderation ???” ^^

jun

jun

agree with aka