oracle PL/SQL 编译失败,没有错误信息

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/283061/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 01:37:27  来源:igfitidea点击:

PL/SQL compilation fails with no error message

oracleplsql

提问by Matthew Watson

My installation of APEX has come pear shaped on a Oracle 9.2.0.5.0 instance, all the packages are invalid.

我在 Oracle 9.2.0.5.0 实例上安装的 APEX 是梨形的,所有包都无效。

I've tried recompiling everything with DBMS_UTILITY.compile_schema, but still all the packages are invalid. So, tried recompiling individual packages,

我试过用 DBMS_UTILITY.compile_schema 重新编译所有东西,但仍然所有的包都是无效的。因此,尝试重新编译单个包,

SQL> ALTER PACKAGE FLOWS_020000.WWV_FLOW_QUERY COMPILE BODY;

Warning: Package Body altered with compilation errors.

SQL> show err
No errors.
SQL> 
SQL> ALTER PACKAGE FLOWS_020000.WWV_FLOW_QUERY COMPILE;

Warning: Package altered with compilation errors.

SQL> show err
No errors.
SQL> 

nothing in the alter log for it..

更改日志中没有任何内容。

How can I find what the error is? shouldn't "show err" give it to me?

我怎样才能找到错误是什么?不应该“显示错误”给我吗?

采纳答案by Matthew Watson

After giving up on this problem for a few months, then coming back to it, I worked it out.

在放弃这个问题几个月之后,然后回到它,我解决了它。

The package I was trying to compile had been wrapped. Apparently, you when compiling wrapped packages, you must be logged in as the package owner.

我试图编译的包已被包装。显然,您在编译打包的包时,必须以包所有者的身份登录。

I suspect a bug was also at play here, as some deeper investigation showed when compiling not as the owner, the server process was actually running out of memory and dying, but logging in as the package owner allowed the object to be compiled without issue.

我怀疑这里也有一个错误,正如一些更深入的调查显示,当不是以所有者身份编译时,服务器进程实际上内存不足并即将死亡,但以包所有者身份登录允许对象编译没有问题。

回答by yellowvamp04

I know this answer is kind of late but just want to let you know that you can also use:

我知道这个答案有点晚了,但只是想让你知道你也可以使用:

ALTER PACKAGE your_package_name_here COMPILE PACKAGE;

ALTER PACKAGE your_package_name_here COMPILE BODY;

then if warning was shown, you can use the below script to check the error and which lines it resides in:

然后如果显示警告,您可以使用以下脚本检查错误及其所在的行:

-- this shows the errors within the package itself

SHOW ERRORS PACKAGE your_package_name_here;

-- this shows the errors within the package body

SHOW ERRORS PACKAGE BODY your_package_name_here;

回答by cagcowboy

Conn as FLOWS_020000 and go:

Conn 为 FLOWS_020000 并继续:

SELECT *
FROM   ALL_ERRORS
WHERE  OWNER = USER;

Or conn as SYSTEM and go

或者 conn 作为 SYSTEM 并去

SELECT *
FROM   ALL_ERRORS
WHERE  OWNER = 'FLOWS_020000';

回答by Gary Myers

try

尝试

SHOW ERRORS PACKAGE BODY FLOWS_020000.WWV_FLOW_QUERY

回答by WW.

SHOW ERRORS PACKAGE FLOWS_020000.WWV_FLOW_QUERY

回答by Jamie Love

I had the same issue today. I found that I was doing (as XXX):

我今天遇到了同样的问题。我发现我在做(作为 XXX):

alter package XXX.my_package compile body;

It would error, and then a show errwould not actually show any error.

它会出错,然后 ashow err实际上不会显示任何错误。

Removing the 'XXX.' allowed me to see the errors.

删除“XXX”。让我看到了错误。