ITPub博客

首页 > IT职业 > IT生活 > 学习笔记 用户和权限

学习笔记 用户和权限

原创 IT生活 作者:wmlm 时间:2007-05-25 14:02:28 0 删除 编辑

sys与system的区别对象权限与系统权限角色权限的区别与权限相关的数据字典

[@more@]

一句话知识:
1 sysdba 比 sysoper 多的权限是建库和更改字符集

对授权后的处理
grant object privileges 之后用户的删除造成的影响:
情景一:
A授权给B with grant option
B授权给C
if drop user B then C lost privilege on A.tab

情景二:
A授权给B和D with grant option
B授权给C
D也授权给C
if drop user B then C lost one of two privileges on A.tab
C can select a.tab through D's grant

grant system and role privilege之后与上面的差异如下:
if Oliver grants DBA to Bill using WITH ADMIN OPTION, then Bill grants DBA
to Bonnie, the database does not record that Bill granted to Bonnie.only
that Bonnie has the role privilege. If Bill is dropped, Bonnie still retains the
system and role privileges that Bill granted to her

一个用户的权限被收回后,他赋给别的用户的权限也一并被收回
if Joshua has used his grant
option and granted David object privileges, then when Joshua’s privilege is
revoked, David’s privilege is revoked along with Joshua’s..

系统权限与角色权限与之不同,数据库不保存grantor的信息,这就与赋权者无关,
A notable difference between object privileges and system or role privileges
is that the grantor of the system or role privilege is not kept. Thus, if
Oliver grants DBA to Bill using WITH ADMIN OPTION, then Bill grants DBA
to Bonnie, the database does not record that Bill granted to Bonnie.only
that Bonnie has the role privilege.

练习:
connect system/manager
grant select any table to jon with admin option;
grant select any table to jason;
connect jon/seekrit
grant select any table to jason;
revoke select any table from jason;

A. Jason can select from any table regardless of any individual table
privileges.
B. Jason can only select from tables that he has been granted SELECT
privileges on or has acquired via a role.
C. Jason can only select from his own tables.
D. Jason continues to enjoy the SELECT ANY TABLE privilege.

正确解答:
B. Oracle does not retain the grantor on system privileges, so if anyone
revokes a system privilege, that privilege is gone, even if the
grantee obtained it from more than one grantor. This behavior is the
same as role privileges, but different from object privileges, such as
SELECT, INSERT, or EXECUTE.

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/271063/viewspace-916219/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2008-04-08

  • 博文量
    398
  • 访问量
    3716794