oracle权限

create user TEST identified by "TEST"  --创建TEST用户

grant update table to TEST;--管理员修改表的权限

grant update on tablename to TEST;--普通用户授予修改表的权限

撤销权限:基本语法同grant,关键字为revoke

select * from user_sys_privs;--查看当前用户所有权限

权限传递

 grant alert table on tablename to TEST with admin option;--关键字 with admin option

 grant alert table on tablename to TEST with grant option;--关键字 with grant option效果和admin类似

角色

  角色即权限的集合,可以把一个角色授予给用户

  create role myrole;--创建角色

  grant create session to myrole;--将创建session的权限授予myrole

  grant myrole to TEST;--授予TEST用户myrole的角色

  drop role myrole;删除角色

  /*但是有些权限是不能授予给角色的,比如unlimited tablespace和any关键字*/

posted @ 2017-05-11 15:01  非非是  阅读(167)  评论(0编辑  收藏  举报