专注数据库开发管理
分类: Oracle
2013-02-06 16:47:25
定义:一组权限的集合,既可以是系统权限也可以是对象权限。
create role r3 identified externally; -- 外部验证
alter role r2 not identified; -- r2改为不带口令验证
select * from dba_roles where role in ('R1','R2','R3');
grant r1,r2 to public; -- 角色授予所有用户
revoke r1 from public;
select * from role_role_privs;
select * from dba_role_privs;
select * from role_sys_privs;
select * from role_tab_privs;
select * from role_sys_privs;
select * from user_tab_privs_made;
select * from dba_role_privs;
select * from session_privs;
alter user u1 default role r1,r2;
alter user u1 default role all except r2;
select * from session_roles;
set role none;
set role all except r2;
select username,tablespace_name,bytes/1024/1024 ,max_bytes/1024/1024 from dba_ts_quotas;
delete_catalog_role 数据字典的删除权限
dba、connect、resource 兼容旧版本而设置