"ORA-04068:包的现有状态已被丢弃 ORA-04065:未执行、更改或删除存储过程

quot;ORA-04068: existing state of packages has been discarded ORA-04065: not executed, altered or dropped stored procedure(quot;ORA-04068:包的现有状态已被丢弃 ORA-04065:未执行、更改或删除存储过程)
本文介绍了"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:未执行、更改或删除存储过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

SQL to Generate Periodic Snapshots from Transactions Table(用于从事务表生成定期快照的SQL)
MyBatis support for multiple databases(MyBatis支持多个数据库)
Oracle 12c SQL: Missing column Headers in result(Oracle 12c SQL:结果中缺少列标题)
SQL query to find the number of customers who shopped for 3 consecutive days in month of January 2020(查询2020年1月连续购物3天的客户数量)
How to get top 10 data weekly (This week, Previous week, Last month, 2 months ago, 3 month ago)(如何每周获取前十大数据(本周、前一周、上个月、2个月前、3个月前))
Select the latest record for an Id per day - Oracle pl sql(选择每天ID的最新记录-Oracle pl SQL)