Oracle error codes
The ORA- errors Oracle Database users search for most, each with the message text from Oracle's error help, what it means in plain words, the usual causes and a fix with SQL.
Reading a Oracle error
Oracle errors have a facility prefix and a five-digit number, such as ORA-00942. ORA errors come from the database server; TNS messages come from Oracle Net, though client libraries usually report them under an ORA-12xxx number.
An error raised inside PL/SQL often arrives as a stack: the real error first, then ORA-06512: at line n entries showing where it was raised. Fix the first error in the stack.
Placeholders in Oracle messages are written as string or number in the documentation and filled in with object names and values at run time.
All Oracle errors in this reference
71 codes, 71 with a full write-up (linked). Codes and messages are from the Oracle Database Error Help.
Connection and login
| Code | Meaning |
|---|---|
ORA-01017
|
invalid username/password; logon denied invalid username/password; logon denied |
ORA-12154
|
TNS: could not resolve the connect identifier TNS:could not resolve the connect identifier specified |
ORA-12514
|
TNS: listener doesn't know the requested service TNS:listener does not currently know of service requested in connect descriptor |
ORA-12505
|
TNS: listener doesn't know the SID TNS:listener does not currently know of SID given in connect descriptor |
ORA-12541
|
TNS: no listener TNS:no listener |
ORA-12170
|
TNS: connect timeout occurred TNS:Connect timeout occurred |
ORA-03113
|
end-of-file on communication channel end-of-file on communication channel |
ORA-03135
|
connection lost contact connection lost contact |
ORA-28000
|
the account is locked The account is locked. |
ORA-28001
|
the password has expired the password has expired |
ORA-01034
|
ORACLE not available ORACLE not available |
ORA-27101
|
shared memory realm does not exist shared memory realm does not exist |
ORA-12519
|
TNS: no appropriate service handler found TNS:no appropriate service handler found |
Names and objects
| Code | Meaning |
|---|---|
ORA-00942
|
table or view does not exist table or view does not exist |
ORA-00904
|
invalid identifier string: invalid identifier |
ORA-00955
|
name is already used by an existing object name is already used by an existing object |
ORA-01031
|
insufficient privileges insufficient privileges |
Syntax and SQL statements
Constraints and keys
| Code | Meaning |
|---|---|
ORA-00001
|
unique constraint violated unique constraint (string.string) violated |
ORA-02291
|
integrity constraint violated - no parent key integrity constraint (string.string) violated - parent key not found |
ORA-02292
|
integrity constraint violated - child record found integrity constraint (string.string) violated - child record found |
ORA-01400
|
cannot insert NULL into column cannot insert NULL into (string) |
ORA-02449
|
unique/primary keys referenced by foreign keys unique/primary keys in table referenced by foreign keys |
ORA-02266
|
keys referenced by enabled foreign keys unique/primary keys in table referenced by enabled foreign keys |
Data values and conversion
| Code | Meaning |
|---|---|
ORA-12899
|
value too large for column value too large for column string (actual: string, maximum: string) |
ORA-01401
|
inserted value too large for column inserted value too large for column |
ORA-01438
|
value larger than specified precision value larger than specified precision allowed for this column |
ORA-01722
|
invalid number invalid number |
ORA-00932
|
inconsistent datatypes inconsistent datatypes: expected string got string |
ORA-01476
|
divisor is equal to zero divisor is equal to zero |
ORA-01843
|
not a valid month not a valid month |
ORA-01861
|
literal does not match format string literal does not match format string |
ORA-01830
|
date format picture ends before end of input date format picture ends before converting entire input string |
Transactions and locking
| Code | Meaning |
|---|---|
ORA-00060
|
deadlock detected while waiting for resource deadlock detected while waiting for resource |
ORA-00054
|
resource busy and acquire with NOWAIT specified resource busy and acquire with NOWAIT specified or timeout expired |
ORA-08177
|
can't serialize access for this transaction can't serialize access for this transaction |
ORA-04021
|
timeout waiting to lock object timeout occurred while waiting to lock object string string string string string |
PL/SQL
| Code | Meaning |
|---|---|
ORA-01403
|
no data found no data found |
ORA-01422
|
exact fetch returns more than requested rows exact fetch returns more than requested number of rows |
ORA-06502
|
PL/SQL: numeric or value error PL/SQL: numeric or value error string |
ORA-06512
|
at line (PL/SQL error stack) at string line string |
ORA-06550
|
PL/SQL compilation error at line, column line string, column string: string |
ORA-06508
|
PL/SQL: could not find program unit being called PL/SQL: could not find program unit being called string |
ORA-06503
|
PL/SQL: function returned without value PL/SQL: Function returned without value |
ORA-04091
|
table is mutating, trigger may not see it table string.string is mutating, trigger/function may not see it |
ORA-04088
|
error during execution of trigger error during execution of trigger ' string.string ' |
ORA-04068
|
existing state of packages has been discarded existing state of packages string string string has been discarded |
Space, memory and limits
| Code | Meaning |
|---|---|
ORA-01652
|
unable to extend temp segment unable to extend temp segment by string in tablespace string |
ORA-01653
|
unable to extend table in tablespace unable to extend table string.string by string in tablespace string |
ORA-01950
|
no privileges on tablespace no privileges on tablespace 'string' |
ORA-01555
|
snapshot too old snapshot too old: rollback segment number string with name "string" too small |
ORA-30036
|
unable to extend segment in undo tablespace unable to extend segment by string in undo tablespace 'string' |
ORA-04031
|
unable to allocate bytes of shared memory unable to allocate string bytes of shared memory ("string","string","string","string") |
ORA-01000
|
maximum open cursors exceeded maximum open cursors exceeded |
ORA-00018
|
maximum number of sessions exceeded maximum number of sessions exceeded |
ORA-00020
|
maximum number of processes exceeded maximum number of processes (string) exceeded |
ORA-00257
|
archiver error Archiver error. Connect AS SYSDBA only until resolved. |
A faster way to work with Oracle
SQLly is a native SQL client for macOS, Windows and Linux with schema-aware IntelliSense and guardrails for risky statements.