角色权限
- 创建角色
--设置用创建角色role1
create role role1;
select * from dba_roles where role = 'ROLE1';可以查到刚增加的角色role1
- 赋予系统权限给角色
--给角色role1赋予创建表权限并可以将自己拥有的权限转授给别的用户,自身没有拥有的权限无法授权给别的用户
grant create table to role1 with admin option;
select * from dba_sys_privs where grantee = 'ROLE1';可以查到刚赋予的系统权限create table
- 系统权限测试
我们可以测试一下把这个角色赋予之前创建的用户看是否生效。如下操作
-
- 执行:grant role1 to ryh with admin option;