oracle
Oracle Database Errors
ORA- prefixed error codes returned by the Oracle Database engine, covering connection, SQL, constraint, and instance errors.
16 codes
· All codes 16 codes
- ORA-00001 unique constraint violated An INSERT or UPDATE statement attempted to store a duplicate value in a column (or set of columns) with a UNIQUE or PRIMARY KEY constraint. Identify the constraint name in the error message, find the conflicting row, and either remove the duplicate or use MERGE/INSERT ... ON CONFLICT logic.
- ORA-00054 resource busy and acquire with NOWAIT specified or timeout expired A DDL statement (e.g. ALTER TABLE, DROP) or a SELECT FOR UPDATE NOWAIT could not obtain a lock because another session holds a conflicting lock. Identify and end the blocking session, or retry the operation without NOWAIT.
- ORA-00060 deadlock detected while waiting for resource Two or more sessions are waiting for resources that the others hold, creating a cycle with no resolution. Oracle automatically detects the deadlock and rolls back one statement in the victim session. The application should retry the transaction. Review locking order in the application to prevent deadlocks.
- ORA-00904 invalid identifier A column name in the SQL statement does not exist in the referenced table or view, or a column alias used in a WHERE/ORDER BY clause is not reachable. Check the column name for typos and ensure it belongs to the table being queried.
- ORA-00942 table or view does not exist The SQL statement references a table or view that either does not exist or that the current user lacks the SELECT (or other required) privilege on. Verify the object name and schema, and grant necessary privileges if the object exists in another schema.
- ORA-00955 name is already used by an existing object A CREATE statement tried to create a database object (table, index, sequence, view, etc.) with a name that already exists in the schema. Either drop or rename the existing object first, or choose a different name for the new object.
- ORA-01017 invalid username/password; logon denied The credentials supplied to connect to the Oracle database are incorrect, or the account is locked. Verify the username and password, check whether the account is locked in DBA_USERS, and ensure the case of the password matches (Oracle 11g+ passwords are case-sensitive by default).
- ORA-01031 insufficient privileges The current user does not have the system or object privilege required to perform the requested operation. Grant the missing privilege (e.g. GRANT SELECT ON schema.table TO user) or ask a DBA to do so.
- ORA-01400 cannot insert NULL into column An INSERT or UPDATE attempted to place a NULL value into a column defined as NOT NULL. Provide a non-null value, or if the column should allow nulls, alter its constraint.
- ORA-01403 no data found A SELECT INTO statement returned no rows, or a FETCH from a cursor returned nothing. In PL/SQL this is a catchable exception. Handle it with a WHEN NO_DATA_FOUND EXCEPTION block, or use a cursor loop that naturally handles empty result sets.
- ORA-01722 invalid number Oracle failed to convert a character string to a number. Usually caused by non-numeric characters in a column or expression expected to be numeric. Inspect the data and use TO_NUMBER() with a format mask, or REGEXP_LIKE to validate before conversion.
- ORA-02291 integrity constraint violated - parent key not found An INSERT or UPDATE on a child table references a foreign key value that does not exist in the parent table. Ensure the parent row is inserted first, or check for typos in the foreign key value.
- ORA-02292 integrity constraint violated - child record found A DELETE or UPDATE on a parent table was blocked because one or more child rows in a referencing table still reference the parent row. Delete or update the child rows first, or define the foreign key with ON DELETE CASCADE.
- ORA-04031 unable to allocate bytes of shared memory Oracle cannot allocate memory from the shared pool (or large pool, Java pool, etc.). The shared pool is exhausted or fragmented. Increase the SHARED_POOL_SIZE parameter, flush the shared pool (ALTER SYSTEM FLUSH SHARED_POOL), or investigate large PL/SQL objects that are not being reused.
- ORA-12154 TNS: could not resolve the connect identifier specified The Oracle client cannot find a matching entry in tnsnames.ora (or other naming method) for the connect identifier used. Verify the service name in tnsnames.ora, check the TNS_ADMIN environment variable points to the correct directory, and run 'tnsping <service_name>' to test resolution.
- ORA-12541 TNS: no listener The Oracle client connected to the host but nothing was listening on the specified port (default 1521). Verify that the Oracle listener is running on the database host (lsnrctl status), that the port is correct in tnsnames.ora, and that no firewall is blocking the connection.