关于授权

昨天一朋友问我 oracle 中如何授权的问题,如下:

请教个问题,如何给一个只有select权限的用户指定update或delete某一个table中的某个column的权限?

如:我现在有个用户user1,在建该用户的时候他只有select 的权限,但我现在有个temp_table ,其中的name栏授权给他有update和delete的权限,命令如何下?

oracle 中有两种权限:系统权限和对象权限

对于系统权限,其命令格式如下:

grant system privilege to user [with admin option]

对于对象权限,其命令格式如下:

grant object privilege on object to user [with grant option]

回收权限:

revoke system privilege from user

revoke object privilege on object from user

对于该问题,命令如下:

grant update(name) on temp_table to user1

delete是针对一行的,所以没办法对某一栏位进行授权

回收只能针对整个表进行,所以命令如下:

revoke update on temp_table from user1

关于权限方面更详细的信息,请查看 oracle 的Book Online

  
« 批量获取表的DDL语句            Home            强制修改字符集 »

No Comments

Be the first to comment on this entry.

Leave a comment

Name(required)
Mail (will not be published)(required)
Website

Fields in bold are required. Email addresses are never published or distributed.

Some HTML code is allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
URLs must be fully qualified (eg: http://www.dbifan.com),and all tags must be properly closed.

Line breaks and paragraphs are automatically converted.

Please keep comments relevant. Off-topic, offensive or inappropriate comments may be edited or removed.

    搜索本站

    站点日历

    1月 2006
    « 12   2 »
     1
    2345678
    9101112131415
    16171819202122
    23242526272829
    3031  

    订阅本站

    文章分类

    最新日志

    热点文章

    日志存档

    常用标签