管理指定验证方式的私有角色

来源:互联网 发布:mac充电指示灯不亮了 编辑:程序博客网 时间:2024/06/05 21:37

私有角色不能直接通过设置默认角色的方式使用,必须连接到用户数据库之后激活。


1.创建用户;

create user ltx identified by ltx;    


2.赋予连接数据库权限

grant create session to ltx;


3.创建带验证方式的角色

create role UserManRole identified by myrollpwd;


4.授予对象权限

grant select,insert,update on scott.emp to UserManRole;


5.把角色分配给用户

grant userManRole to ltx;


6.用所创用户连接数据库

 conn ltx/ltx;


7.激活角色

set role UserManRole identified by myrollpwd;


8.查找数据

select empno from scott.emp;

1 0
原创粉丝点击