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 ...
随机推荐
- 用CRF++开源工具做文本序列标注教程
本文只介绍如何快速的使用CRF++做序列标注,对其中的原理和训练测试参数不做介绍. 官网地址:CRF++: Yet Another CRF toolkit 主要完成如下功能: 输入 -> &qu ...
- [转]Data Flow How-to Topics (SSIS)
本文转自:http://technet.microsoft.com/en-us/library/ms137612(v=sql.90).aspx This section contains proced ...
- vue实现数据驱动视图原理
一.什么是数据驱动 数据驱动是vuejs最大的特点.在vuejs中,所谓的数据驱动就是当数据发生变化的时候,用户界面发生相应的变化,开发者不需要手动的去修改dom. 比如说我们点击一个button,需 ...
- Spark Streaming资源动态分配和动态控制消费速率
本篇从二个方面讲解: 高级特性: 1.Spark Streaming资源动态分配 2.Spark Streaming动态控制消费速率 原理剖析,动态控制消费速率其后面存在一套理论,资源动态分配也有一套 ...
- in_array() 和array_search的区别
在判断字符串是否在某个数组里面的时候,我们会经常用到in_array()和array_search这两个函数. 他们的用法都是在数组中搜索给定的值,但是不同的是, in_array()给定的值 val ...
- [Algorithms] Build a Binary Tree in JavaScript and Several Traversal Algorithms
A binary tree is a tree where each node may only have up to two children. These children are stored ...
- JS 数字左补零函数
/* 左边自动补零 质朴长存法 by lifesinger */ function pad(num, n) { var len = num.toString().length; while(len & ...
- java线程总结(4/5)
转自:http://blog.csdn.net/qiaqia609/article/details/8067356 整理的一些关于线程的面试题目: 46.java中有几种方法可以实现一个线程?用什么关 ...
- Office办公 如何打印顺丰发票
1 关注顺丰速递,我-我的钱包 2 我的钱包-发票申请 3 勾选要打印发票的项目,点击申请发票 4 点击提交,确认发送的邮箱(他是把PDF发到指定邮箱) 最后PDF效果如下 ...
- Wireshark Lua: 一个从RTP抓包里导出H.264 Payload,变成264裸码流文件(xxx.264)的Wireshark插件
Wireshark Lua: 一个从RTP抓包里导出H.264 Payload,变成264裸码流文件(xxx.264)的Wireshark插件 在win7-64, wireshark Version ...