zoukankan      html  css  js  c++  java
  • ORACLE权限中with admin option 、with grant option的用法

    下面这篇文章关于with admin option、with grant option的介绍,比较清晰明确;

     

    参考文章:http://hi.baidu.com/whiteprincer/item/77e5bd901d5590be82d295d2

    with admin option是用在系统权限上的,with grant option是用在对象权限上的。

    SQL语句:

    GRANT CREATE SESSION TO emi WITH ADMIN OPTION; GRANT CREATE SESSION TO role WITH ADMIN OPTION; GRANT role1 to role2 WITH ADMIN OPTION; GRANT select ON customers1 TO bob WITH GRANT OPTION; GRANT select ON customers1 TO hr_manager(role) WITH GRANT OPTION;

    例如:grant create any table to global with admin option;

    此句中的with admin option是什么意思?

    (级联的意思就是第一个用户的权限再授予其他用户,如果第一个用户被取消了该权限,那么通过其他通过第一个用户授予该权限的用户也被波及到,权限同时被取消,不级联的话其他用户就不会被波及。)

    1、with admin option

    with admin option的意思是被授予该权限的用户有权将某个权限(如create any table)授予其他用户或角色,取消是不级联的。

    如授予A系统权限create session with admin option,然后A又把create session权限授予B,但管理员收回A的create session权限时,B依然拥有create session的权限。但管理员可以显式收回B create session的权限,即直接revoke create session from B. 

    2、with grant option

    with grant option的意思是:权限赋予/取消是级联的,如将with grant option用于对象授权时,被授予的用户也可把此对象权限授予其他用户或角色,不同的是但管理员收回用with grant option授权的用户对象权限时,权限会因传播而失效,如grant select on table with grant option to A,A用户把此权限授予B,但管理员收回A的权限时,B的权限也会失效,但管理员不可以直接收回B的SELECT ON TABLE 权限。

     

    授权时,添加了with grant option参数,在撤销时,只能撤销直接授权的用户;不能间接跨越撤销.

     

     

  • 相关阅读:
    安卓打包名称
    安卓判断麦克风权限
    Redis基础了解
    Redis的安装
    SVN的日常使用和安装
    Maven基础2
    Maven基础1
    ResultSet的Type
    Hibernate高级查询QBC条件设置——Restrictions用法 引自:http://www.cnblogs.com/evon168/archive/2010/10/29/1863059.html
    Spring配置事务 http://www.cnblogs.com/leiOOlei/p/3725911.html
  • 原文地址:https://www.cnblogs.com/arcer/p/3200997.html
Copyright © 2011-2022 走看看