BEGIN
--清除挂起内存区域
dbms_resource_manager.clear_pending_area();
--开辟挂起内存区域
dbms_resource_manager.create_pending_area();
--创建白天资源计划
dbms_resource_manager.create_plan('GISINFO_DAYTIME_PLAN','公司业务侧重图形');
--创建资源计划指令
dbms_resource_manager.create_plan_directive(
plan=>'GISINFO_DAYTIME_PLAN',
group_or_subplan=>'AUTH_GROUP',
comment=>'',
cpu_p1=>NULL,cpu_p2=>NULL,cpu_p3=>NULL,cpu_p4=>100,
cpu_p5=>NULL,cpu_p6=>NULL,cpu_p7=>NULL,cpu_p8=>NULL,--CPU资源限制
parallel_degree_limit_p1=>NULL,--并行度限制
active_sess_pool_p1=>NULL,--活动会话池限制
queueing_p1=>NULL,--队列限制
switch_group=>NULL,
switch_time=>NULL,
switch_estimate=>false,
max_est_exec_time=>NULL,
undo_pool=>NULL,--回滚池限制
max_idle_time=>60,--最大空闲时间限制
max_idle_blocker_time=>NULL,
switch_time_in_call=>NULL
);
dbms_resource_manager.create_plan_directive(
plan=>'GISINFO_DAYTIME_PLAN',
group_or_subplan=>'DB_GROUP',
comment=>'',
cpu_p1=>NULL,cpu_p2=>NULL,cpu_p3=>100,cpu_p4=>NULL,
cpu_p5=>NULL,cpu_p6=>NULL,cpu_p7=>NULL,cpu_p8=>NULL,
parallel_degree_limit_p1=>NULL,
active_sess_pool_p1=>NULL,
queueing_p1=>NULL,
switch_group=>NULL,
switch_time=>NULL,
switch_estimate=>false,
max_est_exec_time=>NULL,
undo_pool=>NULL,
max_idle_time=>600,
max_idle_blocker_time=>NULL,
switch_time_in_call=>NULL
);
dbms_resource_manager.create_plan_directive(
plan=>'GISINFO_DAYTIME_PLAN',
group_or_subplan=>'OTHER_GROUPS',
comment=>'',
cpu_p1=>NULL,cpu_p2=>NULL,cpu_p3=>NULL,cpu_p4=>NULL,
cpu_p5=>100,cpu_p6=>NULL,cpu_p7=>NULL,cpu_p8=>NULL,
parallel_degree_limit_p1=>NULL,
active_sess_pool_p1=>NULL,
queueing_p1=>NULL,
switch_group=>NULL,
switch_time=>NULL,
switch_estimate=>false,
max_est_exec_time=>NULL,
undo_pool=>NULL,
max_idle_time=>600,
max_idle_blocker_time=>NULL,
switch_time_in_call=>NULL
);
dbms_resource_manager.create_plan_directive(
plan=>'GISINFO_DAYTIME_PLAN',
group_or_subplan=>'SDE_GROUP',
comment=>'',
cpu_p1=>NULL,cpu_p2=>100,cpu_p3=>NULL,cpu_p4=>NULL,
cpu_p5=>NULL,cpu_p6=>NULL,cpu_p7=>NULL,cpu_p8=>NULL,
parallel_degree_limit_p1=>NULL,
active_sess_pool_p1=>NULL,
queueing_p1=>NULL,
switch_group=>NULL,
switch_time=>NULL,
switch_estimate=>false,
max_est_exec_time=>NULL,
undo_pool=>NULL,
max_idle_time=>600,
max_idle_blocker_time=>NULL,
switch_time_in_call=>NULL
);
dbms_resource_manager.create_plan_directive(
plan=>'GISINFO_DAYTIME_PLAN',
group_or_subplan=>'SYS_GROUP',
comment=>'',
cpu_p1=>100,cpu_p2=>NULL,cpu_p3=>NULL,cpu_p4=>NULL,
cpu_p5=>NULL,cpu_p6=>NULL,cpu_p7=>NULL,cpu_p8=>NULL,
parallel_degree_limit_p1=>NULL,
active_sess_pool_p1=>NULL,
queueing_p1=>NULL,
switch_group=>NULL,
switch_time=>NULL,
switch_estimate=>false,
max_est_exec_time=>NULL,
undo_pool=>NULL,
max_idle_time=>NULL,
max_idle_blocker_time=>NULL,
switch_time_in_call=>NULL
);
--提交
dbms_resource_manager.submit_pending_area();
--激活资源计划
dbms_resource_manager.switch_plan(plan_name=>'GISINFO_DAYTIME_PLAN',sid=>'orcl');
END;
资源管理器之资源计划
最新推荐文章于 2021-11-27 14:45:54 发布
该博客介绍了如何在Oracle数据库中配置和激活资源计划`GISINFO_DAYTIME_PLAN`,用于公司业务中图形处理的资源分配。通过创建计划指令,为不同的资源组如AUTH_GROUP, DB_GROUP, OTHER_GROUPS, SDE_GROUP, SYS_GROUP设置了CPU使用率、并行度限制和最大空闲时间等参数,以优化系统性能。"
104721922,9195780,ES6 标签模板与 String.raw 使用详解,"['es6', 'javascript', '模板字符串', '字符串方法']
5595

被折叠的 条评论
为什么被折叠?



