###2.4 撤销具有GRANT OPTION 的对象权限
- 撤销与数据操纵语言(DML) 操作相关的系统权限时可能会出现级联影响。
- Bob 无法撤销Jeff 授予给Emi 的对象权限。只有被授权者或具有 GRANT ANY OBJECT PRIVILEGE 权限的用户才可以撤销对象权限。
1. 用户bob 授权给jeff查询bob.test01的表带有grant option权限SQL> grant select on test01 to jeff with grant option;Grant succeeded.SQL> select grantee,owner, table_name, privilege from dba_tab_privs where OWNER = 'BOB';GRANTEE OWNER TABLE_NAME PRIVILEGE---------- --------------- --------------- --------------------JEFF BOB TEST01 SELECTSQL> select * from bob.test01; ID NAME---------- ---------- 1 test012. 用户jeff 授权给Emi查询bob.test01表的权限SQL> show user;USER is "JEFF"SQL> grant select on bob.test01 to emi;SQL> select grantee,owner, table_name, privilege from dba_tab_privs where OWNER = 'BOB';GRANTEE OWNER TABLE_NAME PRIVILEGE---------- --------------- --------------- --------------------EMI BOB TEST01 SELECTJEFF BOB TEST01 SELECT3. 用户bob撤销用户emi查询bob.test01表的权限SQL> revoke select on bob.test01 from emi;revoke select on bob.test01 from emi*ERROR at line 1:ORA-01927: cannot REVOKE privileges you did not grant4. 用户bob撤销用户jeff查询bob.test01表的权限SQL> revoke select on bob.test01 from jeff;Revoke succeeded.SQL> select grantee,owner, table_name, privilege from dba_tab_privs where OWNER = 'BOB';no rows selected