Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: ORA-04068 explanation needed.
You can run into these errors when you or someone else compiled some code that has dependencies with the object (SYSADM.STATE_PKG by the looks of it) and that is causing the problem.
Read up on instantiation of objects.
Each object will have an instance in memory. So if your trigger is calling a package that is in turn referecing a package, that session will have all 3 packages instantiated in memory. You can run into state problems when you start compiling source that is in use. By creating a new version of an object in the database, Oracle has to actually throw all the instantiated objects away and recreate them. That is not always as easy as it sounds because these instantiated objects are doing some work and are in a particular state (cursors may be fetched from, variables given particular values).
So compiling objects that have loads of dependencies and of which instances are in memory can lead to these problems. I learned my lessons in the past and try to minimise the relationships between packages to a minimum. No shared record definitions or types ideally, etc.
Try to find your dependency tree with all_dependencies or with ideptree.
Regards,
-- Gerrit-Jan Linker web: http://www.oraxcel.com email: gjlinker_at_oraxcel.com Oraxcel: Linking Oracle to Excel OraCodes: Explaining ORA- error codes OraSQL: Explaining Oracle SQL syntax OraDebug: PL/SQL debugger OraWeb: Oracle access from IE <tim.mcconechy_at_runtime.dk> wrote in message news:8ciaet$vc9$1_at_nnrp1.deja.com...Received on Thu Apr 06 2000 - 00:00:00 CDT
>
>
> HI!
> Anyone able to explain what this means...
> I read the help file but I don't get it!
>
> When I run the trigger which calls a package I get this error.
> (only after I drop and recreate it with the application open)
>
> The help says try the operation again. And if I do it is OK!
> I just want to understand what is going on...
>
> ORA-04068: existing state of packages has been discarded
> ORA-04061: existing state of package "SYSADM.STATE_PKG" has been
> invalidated
> ORA-04065: not executed, altered or dropped package "SYSADM.STATE_PKG"
> ORA-06508: PL/SQL: could not find program unit being called
> ORA-06512: at "SYSADM.INTEGRATE_BI", line 2
> ORA-04088: error during execution of trigger 'SYSADM.INTEGRATE_BI'
>
> Statement Issued:update SYSADM."MOSTATUS" SET yellow=0 where
> recno=5567578231
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
![]() |
![]() |