- Error code
- ORA-06550
- Product
- Oracle Database
- Versions
- Oracle Database 19c, 21c, 23ai and 26ai (same wording)
- Category
- PL/SQL & Triggers
- Last reviewed
- 24 October 2026
On this page
What it means
ORA-06550 means the PL/SQL block you sent could not be compiled; it gives the line and column of the problem, and the PLS- error on the next line says what the problem is.
Before PL/SQL runs an anonymous block or a call, it compiles it. If compilation fails, nothing in the block runs and Oracle reports each problem as an ORA-06550 line with a position, followed by the compiler's own message. Oracle's reference gives the cause as "usually a PL/SQL compilation error" and the action as: refer to the PL/SQL messages that follow.
So read the line after ORA-06550 first. The most common ones have their own pages: PLS-00201 identifier must be declared, PLS-00103 encountered the symbol (a syntax error) and PLS-00306 wrong number or types of arguments. A second ORA-06550 followed by "PL/SQL: Statement ignored" only says that the statement containing the first error was skipped; it is a consequence, not a second problem. Errors in a SQL statement inside the block are reported the same way, with the SQL error (for example ORA-00942) in place of a PLS- code.
The line and column count from the first line of the block as the database received it, not from the top of your script file. For a stored procedure, package or trigger, compilation happens when you run CREATE; Oracle stores the unit even if it has errors, marks it invalid, and lists the errors in USER_ERRORS. A later call to the invalid unit then fails with ORA-06550 and PLS-00905.
Common causes
- A name the compiler cannot resolve: a misspelt variable, a table or procedure that does not exist or is not visible, or a quoted identifier with the wrong case (PLS-00201).
- A syntax error, such as a missing semicolon, a missing END or THEN, or a reserved word used as a name (PLS-00103).
- A call whose arguments do not match any declaration of the subprogram (PLS-00306).
- An error in a SQL statement embedded in the block, such as a missing table or column, reported by the SQL compiler.
- A call to a stored unit that is invalid because it, or something it depends on, failed to compile (PLS-00905).
Diagnose it
Read-only These queries only read the data dictionary (USER_, ALL_ and DBA_ views) and dynamic performance views (V$). They do not change data, privileges or settings, so they are safe to run first. DBA_ and V$ views need the matching privileges.
List the compile errors of stored units
ALL_ERRORS (or USER_ERRORS for your own schema) holds the current errors of every stored unit, with line, position and text. In SQL*Plus or SQLcl, SHOW ERRORS straight after a CREATE shows the same for that unit, and SHOW ERRORS PROCEDURE shop.add_order for a named one.
SELECT name, type, line, position, attribute, text
FROM all_errors
WHERE owner = 'SHOP'
ORDER BY name, type, sequence; One row per error or warning (attribute ERROR or WARNING). Fix the first error of each unit first; later ones are often caused by it.
Which units are invalid?
SELECT object_name, object_type, status, last_ddl_time
FROM all_objects
WHERE owner = 'SHOP'
AND status = 'INVALID'
ORDER BY object_type, object_name; The procedures, packages, triggers and views that will fail when used. A unit can be invalid because of its own errors or because something it depends on changed.
Read the source at the reported line and column
SELECT line, text
FROM all_source
WHERE owner = 'SHOP'
AND name = 'ADD_ORDER'
AND type = 'PROCEDURE'
AND line BETWEEN 2 AND 8
ORDER BY line; The code around the error. For a syntax error, also look at the line before: Oracle notes that the position often refers to the end of the faulty construct.
What does an invalid unit depend on?
SELECT d.referenced_owner, d.referenced_name, d.referenced_type, o.status
FROM all_dependencies d
LEFT JOIN all_objects o
ON o.owner = d.referenced_owner
AND o.object_name = d.referenced_name
AND o.object_type = d.referenced_type
WHERE d.owner = 'SHOP'
AND d.name = 'ADD_ORDER'; Each object the unit uses. One that is INVALID is the thing to fix first. A name that does not exist at all may not appear here, so check ALL_ERRORS as well.
How to fix it
Each fix is labelled with what it changes. Try read-only checks and the least invasive fix first, and test changes outside production.
Fix the PLS- error that follows ORA-06550
Read-onlyGo to the line and column given, then follow the page for the PLS- error: PLS-00201 for names, PLS-00103 for syntax, PLS-00306 for calls. Ignore "PL/SQL: Statement ignored" lines until the error before them is fixed.
Recompile the stored unit and check it compiled cleanly
Changes schemaAfter fixing the code (or the object it depends on), recreate or recompile the unit, then confirm it has no errors left. ALTER ... COMPILE recompiles the stored source without changing it; if errors remain, the unit stays invalid.
ALTER PROCEDURE shop.add_order COMPILE;
-- then, in SQL*Plus or SQLcl
SHOW ERRORS PROCEDURE shop.add_order
Map the line number to your script
Client or network sideFor an anonymous block, line 1 is the first line of the block (DECLARE or BEGIN), not of the file. Tools that send the selected text only, or wrap it, shift the numbering, so count from the start of the block you actually ran.
Examples
A quoted identifier used with the wrong case
Not reproduced here: no Oracle Database is installed for this site. This is the documented example and result from Oracle's PL/SQL Language Reference (lexical units). Double quotation marks make an identifier case-sensitive, so "Hello" is a different name from "HELLO".
DECLARE
"HELLO" VARCHAR2(10) := 'hello';
BEGIN
DBMS_OUTPUT.PUT_LINE("Hello");
END;
/
ORA-06550: line 4, column 25: PLS-00201: identifier 'Hello' must be declared ORA-06550: line 4, column 3: PL/SQL: Statement ignored
Calling a procedure that was created with errors
Not reproduced here: no Oracle Database is installed for this site. The message texts are from Oracle's error reference and the layout follows Oracle's PL/SQL examples; the names and positions are illustrative. The real error is in ADD_ORDER itself: SHOW ERRORS or ALL_ERRORS would list PLS-00201 for LOG_ORDER at line 3.
CREATE OR REPLACE PROCEDURE add_order (p_id IN NUMBER) IS
BEGIN
log_order(p_id); -- no such procedure
END;
/
-- SQL*Plus: Warning: Procedure created with compilation errors.
BEGIN add_order(1); END;
/
ORA-06550: line 1, column 7: PLS-00905: object SHOP.ADD_ORDER is invalid ORA-06550: line 1, column 7: PL/SQL: Statement ignored
How to prevent it
Check every CREATE of PL/SQL code for errors before moving on: run SHOW ERRORS in your scripts, or query USER_ERRORS in deployment checks, and fail the deployment if any unit is invalid. Create triggers DISABLE first if you need to be sure they compile before they take effect.
Avoid quoted identifiers and reserved words as names, and keep blocks small enough that a line number points to one statement.
Common questions
How do I fix ORA-06550?
Read the line after it: that PLS- (or SQL) error is the real problem, at the line and column ORA-06550 gives. Fix it, recompile, and the ORA-06550 lines go away.
What does "PL/SQL: Statement ignored" mean?
It is reported with its own ORA-06550 line after a compile error and says that the statement containing that error was not compiled. It disappears once the error before it is fixed.
How do I see compile errors for a procedure or package?
In SQL*Plus or SQLcl run SHOW ERRORS right after the CREATE, or SHOW ERRORS PACKAGE BODY schema.name later. From any tool, query USER_ERRORS or ALL_ERRORS ordered by name, type and sequence.
Learn more on CodeWithSQL
Official documentation
- ORA-06550 (Oracle Database Error Messages)
- ALL_ERRORS (Oracle Database Reference 19c)
- SHOW, SHOW ERRORS (SQL*Plus User's Guide and Reference 19c)
- Lexical units, identifiers (Oracle PL/SQL Language Reference 19c)
Last technically reviewed 24 October 2026; examples and diagnostics run on Oracle Database Error Messages reference (26ai, 21c and 19c); not run locally. Messages and explanations follow Oracle's Database Error Messages reference; no Oracle Database was available, so the examples were not run locally.