ORA-06512: at line (PL/SQL error stack)
Not an error by itself: a line in the error stack showing which PL/SQL unit and line raised or passed on the real error listed above it.
- Error code
ORA-06512- Category
- PL/SQL
What it means
ORA-06512 entries form a backtrace: ORA-06512: at "APP.BILLING_PKG", line 42. The first error in the stack (above the ORA-06512 lines) is the real problem; each ORA-06512 shows a PL/SQL unit and line it passed through, innermost first.
The full 19c message is at string line string.
Common causes
- Any unhandled error inside PL/SQL, such as ORA-01403, ORA-06502 or a
RAISE_APPLICATION_ERROR.
How to fix it
-
Fix the first error in the stack. Open the unit and line named by the first ORA-06512 to see where it was raised.
SELECT line, text FROM all_source WHERE owner = 'APP' AND name = 'BILLING_PKG' AND type = 'PACKAGE BODY' AND line BETWEEN 35 AND 45;
-
When you log errors in exception handlers, include
DBMS_UTILITY.FORMAT_ERROR_BACKTRACEso the line numbers aren't lost.EXCEPTION WHEN OTHERS THEN log_error(SQLERRM || ' ' || DBMS_UTILITY.FORMAT_ERROR_BACKTRACE); RAISE;
Related errors
ORA-01403no data foundORA-06502PL/SQL: numeric or value errorORA-06550PL/SQL compilation error at line, column
More pl/sql errors
ORA-01422exact fetch returns more than requested rowsORA-06508PL/SQL: could not find program unit being calledORA-06503PL/SQL: function returned without valueORA-04091table is mutating, trigger may not see itORA-04088error during execution of triggerORA-04068existing state of packages has been discarded
The code and message text are from the Oracle Database Error Help. Browse the full Oracle error list or search every database error.
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.