Managing Resources
Review Questions
1. Which system privileges allow you to administer the Database Resource
Manager?
A. DBA
B. ADMINISTER_ANY_RESOURCE
C. ADMINISTER_RESOURCE_MANAGER
D. RESOURCE_MANAGER_ADMIN
E. All of the above
---
Ans: C.
While the DBA role will grant the ADMINISTER_RESOURCE_MANAGER privilege,
DBA is not a valid system privilege name.
2. When creating a plan directive, which of the following resource allocation
methods are valid when the target of the directive is a sub-plan?
A. Execution time limit
B. Undo pool
C. Automatic consumer group switching
D. Canceling SQL and terminating sessions
E. CPU method
---
Ans: E.
A plan directive can only allocate CPU resources to a sub-plan. A, B, C, and D are
all valid allocation methods, but they can only be defined for a resource consumer
group, not for a sub-plan.
E.
3. Which of the following is not a valid consumer group mapping attribute?
A. CLIENT_OS_USER
B. MODULE_NAME
C. CLIENT_PROGRAM
D. MODULE_ACTION
E. SERVICE_MODULE_ACTION
---
Ans: D.
MODULE_ACTION is not a valid attribute by itself. The DBMS_APPLICATION_INFO
package allows applications to define an application name and, secondarily, the
action that they are currently performing. In general, the action without a
corresponding name isn't useful. Therefore, MODULE_NAME and MODULE_NAME_ACTION
are both useful and valid mapping attributes, but not MODULE_ACTION.
4. Which of the following methods of CPU allocation can be defined for a single level resource plan?
A. RATIO
B. EMPHASIS
C. BASIC
D. A, B, and C
E. Both A and B
---
Ans: E.
A single-level resource plan can allocate CPU resources to consumer groups using
either the RATIO or the EMPHASIS (percentage) method. A multi-level resource plan is
limited to using the EMPHASIS method exclusively. BASIC is not a valid CPU
allocation method.
5. What is the effect of the following statement?
ALTER SYSTEM SET RESOURCE_MANAGER_PLAN = 'FORCE:NIGHT_PLAN';
A. DRM will be enabled with NIGHT_PLAN as the top-level plan. Changes to the top-level plan will be restricted.
B. NIGHT_PLAN will be moved into the data dictionary, and DRM will be
enabled with NIGHT_PLAN as the top-level plan. Changes to the toplevel
plan will be restricted.
C. The current DRM top-level plan will be changed to NIGHT_PLAN, in spite of restrictions.
D. NIGHT_PLAN will be moved into the data dictionary, and the current DRM top-level plan will be changed to NIGHT_PLAN, in spite of restrictions.
E. NIGHT_PLAN will be made active.
---
Ans: A.
The ALTER SYSTEM statement sets NIGHT_PLAN as the enabled plan. The FORCE:
prefix restricts the setting from being changed.
6. A simple resource plan can define how many CPU allocation levels?
A. 1
B. 2
C. 4
D. 8
E. 16
---
Ans: D.
Simple resource plans can define up to eight levels of CPU allocation.
7. A session assigned to the MARKETING group is switched to the LOW_GROUP
because it exceeded the execution time set in the SWITCH_TIME_IN_CALL
parameter of the plan directive. When the long-running operation completes,
which group will the session be assigned to?
A. MARKETING
B. LOW_GROUP
C. DEFAULT_GROUP
D. None, the session would have been killed.
----
Ans: A.
The SWITCH_TIME_IN_CALL parameter will cause the offending session to be
switched for the duration of the current operation. It will then revert to its original
group.
8. Where are active DRM objects are located?
A. V$ tables
B. Pending area
C. Data dictionary
D. DRM_OBJECTS table
E. None of the above
----
Ans: C.
When objects in the pending area are submitted, they become active and are stored
in the data dictionary.
9. Consumer groups can be automatically assigned to sessions based on the
mappings created through which DBMS_RESOURCE_MANAGER procedure?
A. CREATE_CONSUMER_GROUP_MAPPING
B. CREATE_GROUP_MAPPING
C. SET_CONSUMER_GROUP_MAPPING
D. MAP_CONSUMER_GROUPS
E. CREATE_CONSUMER_RSRC_GROUP_MAPPING
---
Ans: C.
The SET_CONSUMER_GROUP_MAPPING procedure is used to map session attributes to
consumer groups.
10. Every resource plan must contain an allocation to which consumer group?
A. LOW_GROUP
B. SYS_GROUP
C. DEFAULT_GROUP
D. BASE_GROUP
E. OTHER_GROUPS
---
Ans: E.
The OTHER_GROUPS consumer group is assigned to sessions whose assigned group
is not contained in the enabled plan. Therefore, Oracle requires that an allocation be
made so that no sessions will be completely deprived of resources.
11. Which DBMS_RESOURCE_MANAGER procedure prioritizes consumer group mappings?
A. CREATE_MAPPING_PRIORITY
B. SET_MAPPING_PRIORITY
C. SET_MAPPING_ORDER
D. PRIORITIZE_MAPPING_ORDER
E. This functionality is not available through the DBMS_RESOURCE_MANAGER package.
---
Ans: B. The SET_MAPPING_PRIORITY procedure allows for prioritization based on the
session attribute type.
12. Which of the following are valid methods of switching consumer groups for one or more sessions? (Choose all that apply.)
A. SWITCH_CONSUMER_GROUP_FOR_SESS procedure of DBMS_RESOURCE_MANAGER
B. SWITCH_CONSUMER_GROUPS procedure of DBMS_RESOURCE_MANAGER
C. SWITCH_CONSUMER_GROUP_FOR_USER procedure of DBMS_RESOURCE_MANAGER
D. ALTER SESSION SWITCH CONSUMER GROUP command
E. All of the above
---
Ans: A, C. The SWITCH_CONSUMER_GROUP_FOR_SESS procedure will switch a single session. The procedure SWITCH_CONSUMER_GROUP_FOR_USER will switch all sessions owned by a user.
13. If a session is assigned to a consumer group that is not included in the enabled plan, which group will it be considered part of?
A. None
B. BASE_GROUP
C. DEFAULT_GROUP
D. OTHER_GROUPS
E. SWITCH_GROUP
---
Ans: D.
If a session belongs to a consumer resource group that receives no allocation of
resources from the enabled plan, their session could not function. Therefore, Oracle
switches them to the OTHER_GROUPS group. Because all resource plans are required
to allocate resources to the OTHER_GROUPS group, the session will receive at least
some level of resources.
14. Within a resource plan definition, what differentiates a top-level plan from a
sub-plan?
A. A sub-plan has the PLAN_SUB parameter value set to SUB.
B. A top-level plan has the GROUP_OR_PLAN parameter set to the name of the sub-plan in the resource plan definition.
C. There is no difference in the resource plan definition.
D. A sub-plan always has the CPU_MTH parameter value set to RATIO.
E. The string TOP_LEVEL is appended to the name of top-level resource plans.
---
Ans: C.
There is no concept of sub-plan in the resource plan definition. Only in a resource
plan directive can a sub-plan be identified.
15. Which DBMS_RESOURCE_MANAGER procedure deletes a plan along with all of its subordinate objects?
A. DELETE_PLAN_CASCADE
B. DELETE_RESOURCE_PLAN_CASCADE
C. DROP_PLAN
D. DROP_PLAN_CASCADE
E. Subordinate objects must be deleted separately.
---
Ans: A.
The DELETE_PLAN_CASCADE procedure removes a plan along with any subordinate
objects that it may reference. Using the DELETE_PLAN procedure, on the other hand,
removes the plan but leaves the subordinate objects in place.
16. Which DRM object ties a plan to a resource group and also defines the
allocation method to be utilized?
A. Resource plan
B. Resource plan directive
C. Resource plan rule
D. Consumer group directive
E. None of the above
----
Ans: B.
A resource plan directive identifies a plan, a consumer group (or sub-plan), and
defines the allocation method for a resource.
17. Which view displays the resource consumer groups currently assigned to sessions?
A. V$SESS_GROUP
B. DBA_RSRC_GROUP
C. DBA_RSRC_PLANS
D. V$RSRC_CONSUMER_GROUPS
E. V$SESSION
---
Ans: E.
The V$SESSION view contains a CONSUMER_GROUP column that displays the value of the consumer group currently assigned to the session.
18. The switch privilege can be granted to a user or role by using which
method(s)? (Choose all that apply.)
A. GRANT statement
B. DBMS_RESOURCE_MANAGER procedure
C. DBMS_RESOURCE_MANAGER_PRIVS procedure
D. DBMS_SESSION procedure
E. All of the above
---
Ans: C.
The GRANT_SWITCH_CONSUMER_GROUP procedure in the DBMS_RESOURCE_MANAGER_PRIVS package is the only way to grant the switch privilege to users or roles.
19. Which of the following statements are true regarding users who have been granted the switch privilege? (Choose all that apply.)
A. They can switch only to a consumer group with equal or lower priority.
B. They can switch the group for any session as long as they have been granted the privilege ADMIN option.
C. They can switch to any consumer group for which they have been granted the switch privilege.
D. They can grant the switch privilege to another user if they have been granted the privilege with the ADMIN option.
E. All of the above are true.
---
Ans: C, D.
The switch privilege allows the user to switch their own session to the specified
consumer group. They can grant this privilege to another user if they have ADMIN
rights. They cannot, however, switch consumer groups for sessions other than their
own. Also, they are not limited to switching only to a lower priority group.
20. If the switch privilege has been granted to PUBLIC for a specific consumer group, which of the following statements is true?
A. Any user assigned to that group can switch to another group.
B. Any user can switch to the specified group.
C. Any user with a SWITCH_PUBLIC grant can switch to the specified group.
D. Both A and B are true.
E. A, B, and C are true.
---
Ans: B. Only option B is true. The switch privilege granted to PUBLIC allows any user the
privilege of switching to the group.
Everything Changes
1 week ago
No comments:
Post a Comment