PLS-00157: AUTHID only allowed on schema-level programs解决办法 包体的过程使用调用者权限方法
在包体里写了一个过程,test执行时报错,但是如果把该过程单独拿出来创建一个,就能顺利执行。
在没加上调用者权 authid current_user之前,报错如下
ORA-01031: insufficient privileges。ORA-06512: at "RT_ANN_ODS.ODS_EI_WDNEW", line 1720
查了01031,发现是缺少权限,那么问题就来了,缺少什么权限?
过程能编译完成,只是测试时候报错,那么就是缺少调用者权限了。
锁定了这个问题,就输入调用者权限即可。
在单一的过程中,调用者权限是这样用的:
create or replace procedure p_test
2 Authid Current_User ----写在过程名称之后,is之前
3 is
4 begin
5 execute immediate 'create table creat_table(id number)';
6 end;
7 /
于是在包体里的过程名称后边加上Authid
Current_User ,编译,报错如下:
PLS-00157:
AUTHID only allowed on schema-level programs
这句话的意思是说,AUTHID只能用字啊顶级的项目,也就是在包里使用才能生效。
查了下错误原因 An AUTHID
clause was specified for a subprogram inside a package or type. These clauses
are only supported for top-level stored procedures, packages, and types.
大致意思就是authid只能用在顶级的存储过程、包、类型上,不能用在包或类型的子程序上。
在包上加入authid,执行正常了。
create or replace package p_test
authid current_user is
……
到此,问题解决。
PLS-00157: AUTHID only allowed on schema-level programs解决办法 包体的过程使用调用者权限方法的更多相关文章
- Spring Boot连接MySQL长时间不连接后报错`com.mysql.cj.core.exceptions.ConnectionIsClosedException: No operations allowed after connection closed.`的解决办法
报错:com.mysql.cj.core.exceptions.ConnectionIsClosedException: No operations allowed after connection ...
- mvn打包spring工程成jar时报Unable to locate Spring NamespaceHandler for XML schema namespace错误解决办法
有一个小工程,使用了spring,在使用maven的assembly打包成独立可执行的jar包后,在执行时报如下错误:Configuration problem: Unable to locate S ...
- mac 环境下mysql 不能删除schema问题的解决办法
首先说明下问题环境,我是在mac机器上安装的mysql+workbench. 在删除一个数据库的时候,出现error dropping database cant rmdir ./test 的问题. ...
- Java compiler level does not match the version of the installed Java project facet解决办法
意思就是project facet 和 java compiler level 不一致 解决办法: 修改project facet 方法一: 选中工程,右键 Property -> Projec ...
- '<>' operator is not allowed for source level below 1.7
报错:'<>' operator is not allowed for source level below 1.7 这是eclipse的编译环境与项目的要求不对应造成的,这个错误一般是导 ...
- Eclipse '<>' operator is not allowed for source level below 1.7
'<>' operator is not allowed for source level below 1.7 解决方法:
- eclipse bug之'<>'operator is not allowed for source level below 1.7
eclipse中导入工程,报这个错'<>'operator is not allowed for source level below 1.7,把jdk改成1.7后,提示Android r ...
- Android requires compiler compliance level 5.0 or 6.0. Found '1.4' instead的解决办法
今天在导入工程进Eclipse的时候竟然出错了,控制台输出的是: [2013-02-04 22:17:13 - takepicture] Android requires compiler compl ...
- PHP内存溢出Allowed memory size of 解决办法
PHP内存溢出Allowed memory size of 解决办法 博客分类: php ============================Allowed memory size of x ...
随机推荐
- Because, since, as, for
because, as, for, since这几个词都是表示“原因”的连词,语气由强至弱依次为:because→since→as→for;其中because, since, as均为从属连词,引导原 ...
- Python学习之路上的几个经典问题
1.python有三元运算符语法(类似C语言的"?")么? 语法如下: [on_true] if [expression] else [on_false] 如果[expressio ...
- subline 配置,本地项目代码下断点来调试远程项目
参考: https://my.oschina.net/ptk/blog/299464 1. 文件 tts.sublime-project 的配置如下: { "folders": [ ...
- python 使用 BeautifulSoup 解析html
下载地址:http://www.crummy.com/software/BeautifulSoup/bs4/download/4.3/beautifulsoup4-4.3.2.tar.gz 说明:这个 ...
- git for c#, clone方法
private static void clone() { string wkDir = @"E:\DotNet2010\单位project\Git.Client\lib2Test\Cons ...
- 07-spring学习-bean的其他配置(了解)
首先需要明确,默认情况下,只要在applicationContext.xml文件里面配置的时候自动进行构造方法初始化. 但是用户也可以实现自己的配置,让其在第一次使用的时候进行初始化,这种操作叫做 延 ...
- 一个可变布局列表,有9种布局item大小,每个item可拖拽切换位置
代码地址如下:http://www.demodashi.com/demo/11271.html 一.准备工作 准备一台安卓设备手机,4.4以上版本 本例子实现,一个可变布局列表,有9种布局item大小 ...
- 登录首页时报错:java.lang.IllegalArgumentException (不合法的参数异常)
处理一个老项目,DOWN下项目并配好之后,启动没问题,但是登陆之后首页显示如下: 控制台报错如下: 严重: Servlet.service() for servlet jsp threw except ...
- C# 共享内存(转)
以下是一个C#操作内存的一个类,只要将下面的类添加到相应的项目中,该项目就可以对内存进行直接操作! using System.Runtime.InteropServices; //添加如下命名空 ...
- $("#SpecialAptitude").on("change",function(){CheckType($(this))})$("#SpecialAptitude").on("change",CheckType($(this)))
$("#SpecialAptitude").on("change",function(){CheckType($(this))})$("#Specia ...