1. with admin option是用在系統權限上的,with grant option是用在對象權限上的。
SQL> grant create synonym to scott with grant option;
grant create synonym to scott with grant option
*
第 1 行出現錯誤:
ORA-01939: 隻能指定 ADMIN OPTION
SQL> grant create synonym to scott with admin option;
授權成功。
SQL> grant update on scott.emp to hr with admin option;
grant update on scott.emp to hr with admin option
*
ORA-00993: 缺失 GRANT 關鍵字
SQL> grant update on scott.emp to hr with grant option;
2.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.
3.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 權限。
小小菜鳥一枚