You can then either submit the changes (via SUBMIT_PENDING_AREA) or clear
the changes (via CLEAR_PENDING_AREA). The procedures that manage the pending area do
not have any input variables, so a sample validation and submission of a pending area uses the
following syntax:
execute DBMS_RESOURCE_MANAGER.VALIDATE_PENDING_AREA();
execute DBMS_RESOURCE_MANAGER.SUBMIT_PENDING_AREA();
140 Oracle Database 11g DBA Handbook
Switching Consumer Groups
Three of the parameters in the CREATE_PLAN_DIRECTIVE procedure allow sessions to switch
consumer groups when resource limits are met. As shown in the previous section, the parameters for
CREATE_PLAN_DIRECTIVE include SWITCH_GROUP, SWITCH_TIME, and SWITCH_ESTIMATE.
The SWITCH_TIME value is the time, in seconds, a job can run before it is switched to another
consumer group. The default SWITCH_TIME value is NULL (unlimited). You should set the
SWITCH_GROUP parameter value to the group the session will be switched to once the switch
time limit is reached. By default, SWITCH_GROUP is NULL. If you set SWITCH_GROUP to
the value ???CANCEL_SQL??™, the current call will be canceled when the switch criteria is met. If the
SWITCH_GROUP value is ???KILL_SESSION??™, the session will be killed when the switch criteria is met.
You can use the third parameter, SWITCH_ESTIMATE, to tell the database to switch the consumer
group for a database call before the operation even begins to execute. If you set SWITCH_ESTIMATE
to TRUE, Oracle will use its execution time estimate to automatically switch the consumer group
for the operation instead of waiting for it to reach the SWITCH_TIME value.
Pages:
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259