SHOW ERRORS displays the most recent compilation errors for PL/SQL objects, views, or Java sources in an Oracle session.
Diagnose compile-time problems fast. SHOW ERRORS instantly lists line numbers, positions, and messages for the last DDL you ran, saving you from querying USER_ERRORS manually.
SHOW ERRORS works with functions, procedures, packages, package bodies, views, triggers, and Java classes, sources, or resources created in the current session.
The command is entered in SQL*Plus or any compatible CLI: SHOW ERRORS
.Optional clauses let you narrow output to a specific object type and name.
Add TYPE and NAME clauses: SHOW ERRORS TYPE PROCEDURE NAME PROC_GET_ORDERS
. This prints only that procedure’s errors, even if several objects failed.
Yes. Re-compile the object, or run ALTER ... COMPILE
.Once compilation succeeds, SHOW ERRORS returns “No errors”.
After creating PROC_CREATE_ORDER
you run SHOW ERRORS
and see “PL/SQL: ORA-00942: table or view does not exist” at line 15. You correct the table name, re-compile, and rerun SHOW ERRORS to confirm the fix.
Redirect SHOW ERRORS to a file (SPOOL
) so teammates can review exact compiler feedback and speed up code reviews.
.
No. It only reports compilation errors. Use exception handling or DBMS_OUTPUT for runtime diagnostics.
Yes, query ALL_ERRORS
or DBA_ERRORS
if you have privileges. SHOW ERRORS works only for objects in your current schema.