当前位置: 移动技术网 > IT编程>数据库>Oracle > 如何创建只读权限oracle账户

如何创建只读权限oracle账户

2019年02月01日  | 移动技术网IT编程  | 我要评论

1.创建角色
create role select_role
2.给角色分配权限

grant create view to select_role;
grant create synonym to select_role;

grant connect to select_role;
grant select any dictionary to select_role;
grant select any table to select_role;
grant select any transaction to select_role;
grant select any sequence to select_role;

 

3.把角色赋予指定账户

create user user identified by user default tablespace xxx;
grant select_role to user;
4.删除角色
drop role select_role;

5.检查角色的权限
select * from dba_sys_privs where grantee='select_role'

测试权限的时候需要加上用户的对象例如
select count(*) from hr.ex_user;

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网