Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-04068: existing state of packages has been discarded - avoid

698658Oct 26 2011 — edited Oct 26 2011
Hi,
I'm fighting with developers bad behaviour which is, something like that:
CREATE OR REPLACE PACKAGE pkg1 IS

g_version VARCHAR2(20) := '7.3';
    TYPE t_id_kon IS RECORD(
    id_kon VARCHAR2(12),
    sr_id    NUMBER(5));

  TYPE t_id_kont IS TABLE OF t_id_kon INDEX BY BINARY_INTEGER;
  FUNCTION get_version RETURN VARCHAR2;
END pkg1;
/
I did some tests and looks like when You recompile pkg1 with
global variable g_version there is ORA-04068 generated for every sessions using that pkg1 before recompile.
But what about type and table_type declared in pkg1 are they causing same behaviour as global varialbe g_version ?

And generally how to deal with that kind of situations from application point of view, You have to catch that exception and rerun your request right ?
regards
GregG
This post has been answered by BluShadow on Oct 26 2011
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 23 2011
Added on Oct 26 2011
7 comments
15,034 views