quot;ORA-04068: existing state of packages has been discarded ORA-04065: not executed, altered or dropped stored procedure(quot;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.
您可以执行DBMS_SESSION.RESET_PACKAGE;在使调用完成运行的 PL/SQL 调用之后释放内存、游标和包变量.
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:未执行、更改或删除存储过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:"ORA-04068:包的现有状态已被丢弃 ORA-04065:未执行、更改或删除存储过程


- 导入具有可变标题的 Excel 文件 2021-01-01
- 如何使用 pip 安装 Python MySQLdb 模块? 2021-01-01
- 如何将 Byte[] 插入 SQL Server VARBINARY 列 2021-01-01
- 更改自动增量起始编号? 2021-01-01
- SQL 临时表问题 2022-01-01
- 使用 Oracle PL/SQL developer 生成测试数据 2021-01-01
- 如何将 SonarQube 6.7 从 MySQL 迁移到 postgresql 2022-01-01
- 以一个值为轴心,但将一行上的数据按另一行分组? 2022-01-01
- 远程 mySQL 连接抛出“无法使用旧的不安全身份验证连接到 MySQL 4.1+"来自 XAMPP 的错误 2022-01-01
- 在SQL中,如何为每个组选择前2行 2021-01-01