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!

compilation - revalidation - confusion

herzalJul 21 2010 — edited Jul 26 2010
hey people,

today I ran into some very nice (= horrible) problems. I have a package P which inserts into table TA. I also have some triggers TR, which use functions from package P. when I try to alter table TA (add a column), I get the following error (CHANGE_HISTORY is the name of the package):
ORA-00604: error occurred at recursive SQL level 1
ORA-04068: existing state of packages has been discarded
ORA-04061: existing state of package body "D_NTS_01_DEV_1000.CHANGE_HISTORY" has been invalidated
ORA-06508: PL/SQL: could not find program unit being called: "D_NTS_01_DEV_1000.CHANGE_HISTORY"
ORA-06512: at line 12
this causes that the package P becomes invalid (although no column has been added to table TA)

After that, I execute the exact same statement to add a column to table TA, and it works. The package becomes valid again.

So... Here is the question: why is that happening? What can I do to not execute every ddl-statement twice?

thx for your help in advance
This post has been answered by 731280 on Jul 21 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 23 2010
Added on Jul 21 2010
11 comments
3,109 views