|
Code Listing 1: Resource plan with switch_time_in_call directive for WEB_CUSTOMERS
BEGIN
dbms_resource_manager.clear_pending_area;
dbms_resource_manager.create_pending_area;
dbms_resource_manager.create_consumer_group(
consumer_group => 'WEB_CUSTOMERS',
comment => 'consumer group for sessions invoked from app server');
dbms_resource_manager.create_consumer_group(
consumer_group => 'CUSTOMERS',
comment => 'high priority customers');
dbms_resource_manager.create_plan_directive(
plan=> 'DAYTIME_OPERATIONS',
group_or_subplan => 'WEB_CUSTOMERS',
comment=> 'Website customers',
cpu_p1 => 20,
switch_group => 'CUSTOMERS',
switch_time =>5,
switch_estimate => true,
switch_back_at_call_end=>true);
dbms_resource_manager.create_plan_directive(
plan=> 'DAYTIME_OPERATIONS',
group_or_subplan => 'CUSTOMERS',
comment=> 'Users of high-priority purchasing applications',
cpu_p1 => 60,
switch_group => 'CUSTOMERS',
switch_time =>5,
switch_estimate => true,
switch_back_at_call_end=>true);
dbms_resource_manager.create_plan_directive
plan=> 'DAYTIME_OPERATIONS',
group_or_subplan => 'OTHER_GROUP',
comment => 'The mandatory group',
cpu_p1 =>10);
dbms_resource_manager.submit_pending_area;
END;
|