oracle 授权等操作


   系统字典中

    dba_xxx_xx表只能有dba权限才可访问.使用

    user_xx_xxx对应当前用户的一些属性等(如user_tab_xxx,user_role_xxx等)

    一、查看权限
 

    1、 查看用户本身拥有的权限(你的角色能做什么)

select * from session_privs;

    2 查看用户本身拥有的角色(dba,resource,connect等...)

  

select * from user_role_privs;

  

    3   查看某角色有那些权限 --(dba角色下执行)

select * from dba_sys_privs where grantee = 'RESOURCE' --查看RESOURCE角色拥有的权限

  

    二、授权

    1、把某角色授予某用户

grant connect, resource to test

   

    2、把某表增删改差等权限授予某用户

grant select, insert, delete, update on emp to test

   

    三、收回权限

     用法和grant一样

猜你喜欢

转载自dietime1943.iteye.com/blog/1535499