关于程序包:DBMS_RESOURCE_MANAGE…

   官方文档地址:http://docs.oracle.com/cd/B19306_01/appdev.102/b14258/d_resmpr.htm#i999263

 

Summary of DBMS_RESOURCE_MANAGER_PRIVS Subprograms

 

 

Table 86-1 DBMS_RESOURCE_MANAGER_PRIVS Package Subprograms

SubprogramDescription

GRANT_SWITCH_CONSUMER_GROUP Procedure

Grants the privilege to switch to resource consumer groups

GRANT_SYSTEM_PRIVILEGE Procedure

Performs a grant of a system privilege

REVOKE_SWITCH_CONSUMER_GROUP Procedure

Revokes the privilege to switch to resource consumer groups.

REVOKE_SYSTEM_PRIVILEGE Procedure

Performs a revoke of a system privilege



 

 

 

GRANT_SWITCH_CONSUMER_GROUP Procedure

This procedure grants the privilege to switch to a resourceconsumer group.

Syntax

DBMS_RESOURCE_MANAGER_PRIVS.GRANT_SWITCH_CONSUMER_GROUP (
   grantee_name   IN VARCHAR2, 
   consumer_group IN VARCHAR2, 
   grant_option   IN BOOLEAN);

Parameters

Table 86-2 GRANT_SWITCH_CONSUMER_GROUPProcedure Parameters

ParameterDescription

grantee_name

Name of the user or role to whom privilege is to be granted.

consumer_group

Name of consumer group.

grant_option

TRUE if grantee should be allowed to grant access,FALSE otherwise.


Usage Notes

If you grant permission to switch to a particularconsumer group to a user, then that user can immediately switchtheir current consumer group to the new consumergroup.

 

If you grant permission to switch to a particularconsumer group to a role, then any users who have been granted thatrole and have enabled that role can immediately switch theircurrent consumer group to the new consumer group.

 

If you grant permission to switch to a particularconsumer group to PUBLIC, then any user can switch tothat consumer group.

 

If the grant_option parameter isTRUE, then users granted switch privilege for theconsumer group may also grant switch privileges for that consumergroup to others.

 

In order to set the initial consumer group of a user, you mustgrant the switch privilege for that group to the user.

Examples

BEGIN 
DBMS_RESOURCE_MANAGER_PRIVS.GRANT_SWITCH_CONSUMER_GROUP ( 
 'scott', 'mail_maintenance_group', true); 
DBMS_RESOURCE_MANAGER.CREATE_PENDING_AREA(); 
DBMS_RESOURCE_MANAGER.set_consumer_group_mapping( 
  dbms_resource_manager.oracle_user, 'scott','mail_maintenance_group'); 
DBMS_RESOURCE_MANAGER.SUBMIT_PENDING_AREA(); 
END; 
/ 

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值