ITPub博客

首页 > 数据库 > Oracle > grant授权

grant授权

Oracle 作者:家有ORACLE老公 时间:2020-02-18 22:14:35 0 删除 编辑

sys(管理员)身份登录,创建用户名zsta_new

create user zsta_new
  identified by 密码
  default tablespace ZSTA_DATA_TBS
  temporary tablespace TEMP
  profile DEFAULT;


给zsta_new用户授权(允许创建存储过程等):
grant connect to zsta_new;
grant resource to zsta_new;
grant create any procedure to zsta_new;
grant create any view to zsta_new;
grant unlimited tablespace to zsta_new;
grant create database link to zsta_new;
grant debug any procedure, debug connect session to zsta_new;


假设zsta_new用户创建了一个存储过程up_xx_gzmx ,并允许smxxpt用户调用

那么以zsta_new用户登录,执行以下语句:

grant execute on up_xx_gzmx to smxxpt


参考:

众所周知,grant是给别的用户赋权限。他不只能够给表,视图赋权限,而且对存储过程,方法,以及包都可以,具体语法参考如下:

    1.grant给表赋权限:

    grant  select/update on  table to user;

    grant  权限 on 表  to 用户。

    2.grant 给存储过程赋权限:

    grant execute on package/function/procedure to user;

    grant execute on 过程、包、方法 to user
————————————————
版权声明:本文为CSDN博主「万蕊清」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/gateway6143/article/details/41212823

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

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

注册时间:2020-01-06

  • 博文量
    34
  • 访问量
    49012