All errors › ORA errors
ORA-04068: Existing state of packages has been discarded
What it means
A package with global (package-level) variables was recompiled while your session was using it, so the session's copy of the package state was thrown away. Often followed by ORA-04061/ORA-04065.
How to fix it
Re-run the call (the second call usually succeeds). To avoid it, keep package state out of frequently deployed packages, move it to a separate state package, or mark stateless packages with PRAGMA SERIALLY_REUSABLE; use Edition-Based Redefinition for zero-downtime deploys.
Catch it before it runs
ORA Error Helper
Explains ORA-/PLS- codes inside JetBrains IDEs and DataGrip. PL/SQL Lint
Flags risky PL/SQL patterns while you type. Oracle Plan Reader
Reads execution plans and points at the slow step. PL/SQL in Practice
Kindle book with practical PL/SQL for working developers.
Explains ORA-/PLS- codes inside JetBrains IDEs and DataGrip. PL/SQL Lint
Flags risky PL/SQL patterns while you type. Oracle Plan Reader
Reads execution plans and points at the slow step. PL/SQL in Practice
Kindle book with practical PL/SQL for working developers.
Nearby errors
Updated 2026-11-12.