oracle 用户权限之执行存储过程权限不足

操作系统版本:

[oracle@se31 ~]$ uname -a
Linux se31 3.8.13-44.1.1.el6uek.x86_64 #2 SMP Wed Sep 10 06:10:25 PDT 2014 x86_64 x86_64 x86_64 GNU/Linux
[oracle@se31 ~]$ cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 6.6 (Santiago)
[oracle@se31 ~]$ 

数据库版本:

[oracle@se31 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Tue Jun 20 10:52:57 2017
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
PL/SQL Release 11.2.0.4.0 - Production
CORE 11.2.0.4.0 Production
TNS for Linux: Version 11.2.0.4.0 - Production
NLSRTL Version 11.2.0.4.0 - Production
SQL> 

今天,开发同事使用drgs执行存储过程包报错权限不足,如下图:


报错提示很明显,就是drgs没有执行存储过程的权限,原因估计是最近数据安全取消了drgs用户的dba权限执行revoke dba from drgs导致的;

回收drgs的dba权限后,需要细粒度赋权限:

[oracle@se31 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Tue Jun 20 09:59:52 2017
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select username from dba_users where username='DRGS';
USERNAME
------------------------------
DRGS
SQL> grant resource to drgs;

Grant succeeded.

SQL> grant create any procedure to drgs;

Grant succeeded.

SQL> grant execute any procedure to drgs;

Grant succeeded.

SQL> quit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@se31 ~]$ 

细粒度赋权限后,经开发同事测试drgs能够正常执行存储过程了。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值