OCP CBT Question 679

Please solve the following question.

You are managing an Oracle Database and want to ensure that sessions belonging to the 'REPORT_USERS' consumer group are automatically switched to the 'LOW_PRIORITY_USERS' consumer group if they execute for more than 300 seconds. Additionally, you want to immediately kill any session in 'LOW_PRIORITY_USERS' that exceeds 1800 seconds of execution. Which sequence of commands will achieve this goal?

Existing Setup

Assume the following resource plan and consumer groups are already created:

BEGIN
  DBMS_RESOURCE_MANAGER.CREATE_PENDING_AREA();
  DBMS_RESOURCE_MANAGER.CREATE_PLAN('MY_PLAN', 'My Main Resource Plan');
  DBMS_RESOURCE_MANAGER.CREATE_CONSUMER_GROUP('REPORT_USERS', 'Users running reports');
  DBMS_RESOURCE_MANAGER.CREATE_CONSUMER_GROUP('LOW_PRIORITY_USERS', 'Low priority background users');
  DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE(
    PLAN => 'MY_PLAN',
    GROUP_OR_SUBPLAN => 'REPORT_USERS',
    MGMT_PERCENT => 70);
  DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE(
    PLAN => 'MY_PLAN',
    GROUP_OR_SUBPLAN => 'LOW_PRIORITY_USERS',
    MGMT_PERCENT => 30);
  DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE(
    PLAN => 'MY_PLAN',
    GROUP_OR_SUBPLAN => 'OTHER_GROUPS',
    MGMT_PERCENT => 0);
  DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE(
    PLAN => 'MY_PLAN',
    GROUP_OR_SUBPLAN => 'SYS_GROUP',
    MGMT_PERCENT => 0);
END;
/