ocp考试资料群:569933648 验证码:ocp ocp 12c 19c考试题库解析与资料群:钉钉群号:35277291
全部博文(486)
分类: oracle
2019-09-18 15:01:37
examine the facts about a database:
1.users is the database default tablespace.
2.user1,user2,and user3 have the create session privilege.
3.they also have unlimited quota on the default tablespace users.
4.they have no other privileges.
examine these commands:
sql > conn / as sysdba
connected
sql > grant create table to user1 with admin option;
grant succeeded.
sql > grant create table to user2;
grant succeeded.
sql > grant create table to user3 with admin option;
grant succeeded.
which two are true ?
a)if sys revokes create table from user1 , it is not revoked from user2 and user3.
b)only sys can revoke create table from user1.
c)if sys revokes create table from user1 , it is revoked from user2 but not from user3.
d)any user with create table with grant option can revoke create table
from user1.
e)only sys and user1 can revoke create table from user3.
answer: ae
赵:ad=>ae。注意与下题的区别是,user2 和 user3 的权限是由 sys 直接授权的,而不是由 user1授权的。注意 d 选项中是 with grant option,而不是 with admin option。经测试,选 e。user2不能收回 user3 的权限。
sql> conn user2/123456;
connected.
sql> revoke create table from user3;
revoke create table from user3
*
error at line 1:
ora-01031: insufficient privileges
with admin option:
使用 with admin option,被授权用户可将所获得的权限再次授予其它用户或角色,而且取消授权时不级联。例如:
sql>grant create session to user_a with admin option;
则用户 user_a 用户拥有了“create session”权限,然后用户 user_a 操作:
sql>grant create session to user_b;
则 user_b 也拥有了“create session”权限。
如果系统管理员要回收 user_a 的权限,则 user_b 的权限仍然保留,但管理员可以显式回收 user_b 的权限:
sql>revoke create session from user_b;
with grant option:
使用 with grant option。被授权用户可将所获得的权限再次授予其它用户或角色,并且权限的取消是级联的。级联的意思是,如果 user_a 使用“with grant option”语句将权限又授予了 user_b,当管理员回收 user_a 的权限时,则 user_b 的权限也会被回收。但管理员不可以显式回收用户 user_b 的权限。