"ORA-04068:软件包的现有状态已被丢弃ORA-04065:未执行,更改或删除了存储过程 [英] "ORA-04068: existing state of packages has been discarded ORA-04065: not executed, altered or dropped stored procedure

查看:656
本文介绍了"ORA-04068:软件包的现有状态已被丢弃ORA-04065:未执行,更改或删除了存储过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试在过程"CALLING_PROCEDURE_NAME"下执行过程"PROCEDURE_NAME"时,出现以下错误. 但是我的PROCEDURE_NAME已经处于有效状态,并且可以在其他一些过程中成功使用.

i m getting below error when i m trying to execute procedure "PROCEDURE_NAME" under procedure "CALLING_PROCEDURE_NAME". But my PROCEDURE_NAME is already in valid state and successfully using in some other procedures.

ORA-04068: existing state of packages has been discarded
ORA-04065: not executed, altered or dropped stored procedure ""PROCEDURE_NAME""
ORA-06508: PL/SQL: could not find program unit being called: ""PROCEDURE_NAME""
ORA-06512: at ""CALLING_PROCEDURE_NAME"", line LINE_NO
ORA-06512: at line 1

推荐答案

但是我的PROCEDURE_NAME已经处于有效状态,并且可以成功使用 在其他一些程序中.

But my PROCEDURE_NAME is already in valid state and successfully using in some other procedures.

当前调用该程序包的会话,它将保留该程序包的状态.如果重新编译该软件包,则在该会话中再次调用该软件包时,就会遇到此错误.

The session where the package is currently called, it retains that state of the package. If you recompile the package, then the moment the package is called in that session again, you will hit this error.

  1. 您可以执行 DBMS_SESSION.RESET_PACKAGE; 来执行在使调用完成的PL/SQL调用运行之后,释放内存,游标和包变量.

  1. You can execute DBMS_SESSION.RESET_PACKAGE; to free the memory, cursors, and package variables after the PL/SQL call that made the invocation finishes running.

您可以关闭所有现有会话并重新执行.

You could close all existing sessions and re-execute.

您可以制作软件包, SERIALLY_REUSABLE软件包通过使用PRAGMA SERIALLY_REUSABLE;语句.如果程序包是SERIALLY_REUSABLE,则其程序包状态存储在系统全局区域(SGA)中小型池中的工作区中.程序包状态仅在服务器调用期间一直存在.

You could make the package, SERIALLY_REUSABLE Packages by using PRAGMA SERIALLY_REUSABLE; statement. If a package is SERIALLY_REUSABLE, its package state is stored in a work area in a small pool in the system global area (SGA). The package state persists only for the life of a server call.

这篇关于"ORA-04068:软件包的现有状态已被丢弃ORA-04065:未执行,更改或删除了存储过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆