oracle PLS-907 无法加载库单元

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/16530843/
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 05:01:36  来源:igfitidea点击:

PLS-907 cannot load library unit

oracleoracle11g

提问by Jap Evans

Following is my oracle version Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production

以下是我的 oracle 版本 Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production

I was trying to alter a table to add a column but since it took long time, i cancelled it.

我试图改变一个表来添加一列,但由于它花了很长时间,我取消了它。

After sometime, i started seeing errors in all packages and views that referenced the unit. Error message is

一段时间后,我开始在所有引用该单元的包和视图中看到错误。错误信息是

PLS-907: cannot load library unit (table name)

PLS-907: 无法加载库单元(表名)

Googling on this error does not give much information. In one place, i saw that below command will help but it seems to me as very risky command

谷歌搜索这个错误并没有提供太多信息。在一个地方,我看到下面的命令会有所帮助,但在我看来这是非常危险的命令

alter system flush shared_pool

更改系统刷新 shared_pool

Can anyone help me with the reason and solution to this?

任何人都可以帮助我解决这个问题的原因和解决方案吗?

Thanks, Jeevan

谢谢,吉文

回答by Rishi Soni

it happens because of DB links are dropped and recreated for connections so just recompiling the package will resolve this and some times it automatically recompile it .

这是因为数据库链接被删除并为连接重新创建,因此只需重新编译包即可解决此问题,有时它会自动重新编译它。

回答by alexherm

While changing the length of a varchar2 may resolve a problem in one procedure, for example, it can cause other objects to go invalid. Typically the solution for resolving the invalid object is just recompiling. Before recompiling - parameters, variables, etc need to be checked to ensure they accommodate for the change.

虽然更改 varchar2 的长度可能会解决一个过程中的问题,例如,它可能会导致其他对象无效。通常,解决无效对象的解决方案就是重新编译。在重新编译之前 - 需要检查参数、变量等以确保它们适应更改。