oracle 授予架构角色

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7473958/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 03:33:12  来源:igfitidea点击:

grant role to schema

oracleoracle10grolegrant

提问by Imran

GRANT ROLE_BLAH_GENERAL TO BLAH_USER

I encountered this error

我遇到了这个错误

ORA-01932: ADMIN option not granted for role 'ROLE_BLAH_GENERAL'

Then I reformed the query to

然后我将查询改造成

GRANT ROLE_BLAH_GENERAL TO BLAH_USER WITH ADMIN OPTION;

I then encountered

然后我遇到了

ORA-01932: ADMIN option not granted for role 'ROLE_BLAH_GENERAL'

Where am I going wrong?

我哪里错了?

回答by Justin Cave

The user that issues the GRANTneeds to have been granted the role WITH ADMIN OPTION. Otherwise, the user doesn't have permission to grant the role to others.

发出GRANT需要的用户已被授予角色WITH ADMIN OPTION。否则,用户无权将该角色授予其他人。

If you want user FOO, for example, to be able to grant the ROLE_BLAH_GENERALrole to other users, the DBA would need to

FOO例如,如果您希望 user能够将ROLE_BLAH_GENERAL角色授予其他用户,则 DBA 需要

GRANT role_blah_general
   TO foo
 WITH ADMIN OPTION;

Once that is done, FOOshould be able to grant the role to other users

完成后,FOO应该能够将角色授予其他用户

GRANT role_blah_general
   TO blah_user

Of course, you may prefer that the DBA that granted ROLE_BLAH_GENERALto FOObe the one to grant the role to BLAH_USERso that FOOdoesn't need the role WITH GRANT OPTION.

当然,你可能更喜欢的是授予DBAROLE_BLAH_GENERALFOO是授予角色到一个BLAH_USERFOO不需要的作用WITH GRANT OPTION