Skip to content

Custom database views built on top of IFS views (to expose Custom Field data for external BI/SSIS extracts) intermittently fail with ORA-04068/ORA-04061/ORA-04065 ('existing state of package has been discarded/invalidated'), but re-running the exact same script immediately afterward works fine.

Answer

This happens when someone publishes or synchronizes a Custom Object (like a custom field) on the same logical unit your view depends on while your script is running — that publish/sync action invalidates and recompiles the underlying generated packages (like a *_CFP package) mid-flight, which is what your script's error is catching in the act. You can check the 'Refresh Server Cache' window to see when the Custom Objects cache was last refreshed (though not by whom or for which object), and confirm a given logical unit's custom fields show as synchronized in the Custom Fields window. No manual recovery action is normally needed — once the underlying object finishes recompiling, simply re-running the same script succeeds, since nothing was actually broken, just transiently invalidated.

← Browse Developer Studio, deployment, and upgrades questions