// Oracle error reference

ORA-06508: PL/SQL: could not find program unit being called

PL/SQL called a procedure or package that is missing, invalid or not accessible at run time, often after it was dropped or failed to recompile.

Error code
ORA-06508
Category
PL/SQL
Error message
PL/SQL: could not find program unit being called string

What it means

ORA-06508 means a called program unit couldn't be found or loaded when the call ran. It frequently follows ORA-04068 (existing state of packages has been discarded) after a package was recompiled while sessions were using it.

Common causes

  • The called package or procedure was dropped or is invalid after a change it depends on.
  • The calling session had package state discarded by a recompilation.
  • Missing privilege on the called unit.

How to fix it

  1. Find invalid objects and recompile them.

    SELECT object_name, object_type FROM user_objects WHERE status = 'INVALID';
    ALTER PACKAGE billing_pkg COMPILE BODY;
  2. Reconnect sessions that held old package state, or retry the call once.

Related errors

More pl/sql errors

The code and message text are from the Oracle Database Error Help. Browse the full Oracle error list or search every database error.

// fewer errors, faster fixes

Work on Oracle in SQLly

A native SQL client for macOS, Windows and Linux with schema-aware IntelliSense, guardrails for risky statements and clear error messages, for Oracle and the other databases you use.