ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 043-174

043-174

原创 Linux操作系统 作者:jbymy2000 时间:2012-03-10 10:48:02 0 删除 编辑
174. You want to create a consumer group, GROUP1, and you execute the
following command in the command-line interface:
SQL> EXEC DBMS_RESOURCE_MANAGER.CREATE_CONSUMER_GROUP
(CONSUMER_GROUP =>'group1', COMMENT => 'New Group');
This command errors out displaying the following message:
ERROR at line 1:
ORA-29371: pending area is not active
ORA-06512: at "SYS.DBMS_RMIN", line 115
ORA-06512: at "SYS.DBMS_RESOURCE_MANAGER", line 108
ORA-06512: at line 1
What action would you take to overcome this error?
A.activate the Pending Area before creating the consumer group
B.create the Pending Area before creating the consumer group
C.increase the size of the database buffer cache to accommodate the P
ending Area
D.increase the size of the shared pool to accommodate the Pending Are
a
E.increase the size of the large pool to accommodate the Pending Area
Answer: B
1.创建一个挂起区域:
SQL> exec dbms_resource_manager.create_pending_area;
2.创建资源规划
SQL> exec dbms_resource_manager.create_plan(plan =>'test_plan',COMMENT=>'this is
testing plan') ;
3.创建用户组
SQL> exec dbms_resource_manager.create_consumer_group( consumer_group => 'demo',
comment => 'yes it is a demo' );
4.指定资源规划指令
SQL> exec dbms_resource_manager.create_plan_directive( plan =>
'test_plan',group_or_subplan => 'demo',comment => 'its a demo',MAX_EST_EXEC_TIME
=> 5 );
SQL> exec dbms_resource_manager.create_plan_directive( plan =>
'test_plan',group_or_subplan => 'OTHER_GROUPS', comment => 'its a demo' );
5.验证变化
SQL> exec dbms_resource_manager.validate_pending_area;
PL/SQL procedure successfully completed.
6.提交
SQL> exec dbms_resource_manager.submit_pending_area;
PL/SQL procedure successfully completed.
7.创建一个用户
SQL> drop user user1 cascade;
SQL> create user user1 identified by abc123;
SQL> grant connect, resource to user1;
8.授予切换权限,其实就一并将资源规则分配给这个用户
SQL> exec dbms_resource_manager_privs.grant_switch_consumer_group ( 'user1',
'demo', TRUE );
SQL> exec dbms_resource_manager.set_initial_consumer_group ( 'user1', 'demo' );
PL/SQL procedure successfully completed.
9.启动数据库资源管理器
SQL> alter system set resource_manager_plan = test_plan scope = memory;
System altered.
10.用户登录检验设置
SQL> conn user1/abc123;
SQL> create table t as select * from all_objects;
SQL> analyze table t compute statistics;
SQL> select count(*) from t;
COUNT(*)
----------
40138
SQL> select count(*) from t,t;
select count(*) from t,t
ERROR at line 1:
ORA-07455: estimated execution time (59781 secs), exceeds limit (5 secs)
可以看到,已经被限制了.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/11312660/viewspace-718237/,如需转载,请注明出处,否则将追究法律责任。

上一篇: 043-173
下一篇: 043-175
请登录后发表评论 登录
全部评论

注册时间:2012-01-10

  • 博文量
    416
  • 访问量
    205811