文章地址:http://docs.oracle.com/cd/B19306_01/appdev.102/b14258/d_resmgr.htm#sthref4828
CREATE_PLAN_DIRECTIVEProcedure
This procedure lets you create resource plan directives.
DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE (
plan IN VARCHAR2,
group_or_subplan IN VARCHAR2,
comment IN VARCHAR2,
cpu_p1 IN NUMBER DEFAULT NULL,
cpu_p2 IN NUMBER DEFAULT NULL,
cpu_p3 IN NUMBER DEFAULT NULL,
cpu_p4 IN NUMBER DEFAULT NULL,
cpu_p5 IN NUMBER DEFAULT NULL,
cpu_p6 IN NUMBER DEFAULT NULL,
cpu_p7 IN NUMBER DEFAULT NULL,
cpu_p8 IN NUMBER DEFAULT NULL,
active_sess_pool_p1 IN NUMBER DEFAULT NULL,
queueing_p1 IN NUMBER DEFAULT NULL,
parallel_degree_limit_p1 IN NUMBER DEFAULT NULL,
switch_group IN VARCHAR2 DEFAULT NULL,
switch_time IN NUMBER DEFAULT NULL,
switch_estimate IN BOOLEAN DEFAULT FALSE,
max_est_exec_time IN NUMBER DEFAULT NULL,
undo_pool IN NUMBER DEFAULT NULL,
max_idle_time IN NUMBER DEFAULT NULL,
max_idle_blocker_time IN NUMBER DEFAULT NULL,
switch_time_in_call IN NUMBER DEFAULT NULL);
Table 85-6 CREATE_PLAN_DIRECTIVE ProcedureParameters
Parameter | Description |
---|---|
| The name of the resource plan. |
| The name of the consumer group or subplan. |
| Comment for the plan directive. |
| For |
| For |
| For |
| For |
| For |
| For |
| For |
| For |
| Specifies maximum number of concurrently active sessions for aconsumer group. Default is |
| Specified time (in seconds) after which a job in the inactivesession queue (waiting for execution) will time out. Default is |
| Specifies a limit on the degree ofparallelism for any operation. Default is --指定任何操作的平行度限制,默认为空值,即意味无限大。 |
| Specifies consumer group to which this session is switched ifother switch criteria is met. Default is |
| Specifies time (in seconds) that a session can execute before anaction is taken. Default is |
| If |
| Specifies the maximum execution time (in seconds) allowed for asession. If the optimizer estimates that an operation will takelonger than |
| Sets a maximum in kilobytes ( |
| Indicates the maximum session idle time. Default is |
| The maximum amount of time in seconds that a session can be idlewhile blocking another session's acquisition of a resource. |
| Specifies time (in seconds) that a session can execute before anaction is taken. At the end of the top call, the consumer group ofthe session is restored to its original consumer group. Default is |
-
All parameters default to
NULL
. However, for theEMPHASIS
CPU
resource allocation method,this case would starve all the users. -
For
max_idle_time
andmax_idle_blocker_time
,PMON
will checkthese limits once a minute. If it finds a session that has exceededone of the limits, it will forcibly kill the session and clean upall its state. -
The parameter
switch_time_in_call
is mostly usefulfor three-tier applications where the mid-tier server isimplementing session pooling. By usingswitch_time_in_call
, the resource usage of one clientwill not affect a future client that happens to be executed on thesame session.