Oracle® Database Administrator's Guide 11g Release 2 (11.2) Part Number E25494-02 |
|
|
PDF · Mobi · ePub |
You can use several static data dictionary views and dynamic performance views to view the current configuration and status of Oracle Database Resource Manager (the Resource Manager). This section provides the following examples:
See Also:
Oracle Database Reference for details on all static data dictionary views and dynamic performance viewsThe DBA_RSRC_CONSUMER_GROUP_PRIVS
view displays the consumer groups granted to users or roles. Specifically, it displays the groups to which a user or role is allowed to belong or be switched. For example, in the view shown below, user SCOTT
always starts in the SALES
consumer group, can switch to the MARKETING
group through a specific grant, and can switch to the DEFAULT_CONSUMER_GROUP
(OTHER_GROUPS
) and LOW_GROUP
groups because they are granted to PUBLIC
. SCOTT
also can grant the SALES
group but not the MARKETING
group to other users.
SELECT * FROM dba_rsrc_consumer_group_privs; GRANTEE GRANTED_GROUP GRANT_OPTION INITIAL_GROUP ------------------ ------------------------------ ------------ ------------- PUBLIC DEFAULT_CONSUMER_GROUP YES YES PUBLIC LOW_GROUP NO NO SCOTT MARKETING NO NO SCOTT SALES YES YES SYSTEM SYS_GROUP NO YES
SCOTT
was granted the ability to switch to these groups using the DBMS_RESOURCE_MANAGER_PRIVS
package.
This example uses the DBA_RSRC_PLANS
view to display all of the resource plans defined in the database. All plans have a NULL
status, meaning that they are not in the pending area.
Note:
Plans in the pending area have a status ofPENDING
. Plans in the pending area are being edited.SELECT plan,status,comments FROM dba_rsrc_plans; PLAN STATUS COMMENTS --------------------------- -------- ---------------------------------------- DSS_PLAN Example plan for DSS workloads that prio... ETL_CRITICAL_PLAN Example plan for DSS workloads that prio... MIXED_WORKLOAD_PLAN Example plan for a mixed workload that p... ORA$AUTOTASK_SUB_PLAN Default sub-plan for automated maintenan... DEFAULT_MAINTENANCE_PLAN Default plan for maintenance windows tha... DEFAULT_PLAN Default, basic, pre-defined plan that pr... INTERNAL_QUIESCE Plan for quiescing the database. This p... INTERNAL_PLAN Internally-used plan for disabling the r... ORA$AUTOTASK_HIGH_SUB_PLAN Default sub-plan for high-priority, auto...
You can use the V$SESSION
view to display the consumer groups that are currently assigned to sessions.
SELECT sid,serial#,username,resource_consumer_group FROM v$session; SID SERIAL# USERNAME RESOURCE_CONSUMER_GROUP ----- ------- ------------------------ -------------------------------- 11 136 SYS SYS_GROUP 13 16570 SCOTT SALES ...
This example sets mydb_plan
, as created by the example shown earlier in "Multilevel Plan Example", as the top level plan. It then queries the V$RSRC_PLAN
view to display the currently active plans. The view displays the current top level plan and all of its descendent subplans.
ALTER SYSTEM SET RESOURCE_MANAGER_PLAN = mydb_plan; System altered. SELECT name, is_top_plan FROM v$rsrc_plan; NAME IS_TOP_PLAN ---------------------------- MYDB_PLAN TRUE MAILDB_PLAN FALSE BUGDB_PLAN FALSE