All errors › ORA errors
ORA-00060: Deadlock detected while waiting for resource
What it means
Two sessions each hold a lock the other one needs. Oracle detects the cycle and rolls back the current statement of one of them (not the whole transaction). A trace file with the deadlock graph is written to the diagnostic directory.
How to fix it
Make all code paths lock rows in the same order (for example ORDER BY primary key in SELECT ... FOR UPDATE). Index foreign key columns: unindexed foreign keys are the classic cause of deadlocks when parent rows are deleted or their keys updated. Keep transactions short and commit or roll back after the error.
Catch it before it runs
ORA Error Helper
Explains ORA-/PLS- codes inside JetBrains IDEs and DataGrip. PL/SQL Lint
Flags risky PL/SQL patterns while you type. Oracle Plan Reader
Reads execution plans and points at the slow step. PL/SQL in Practice
Kindle book with practical PL/SQL for working developers.
Explains ORA-/PLS- codes inside JetBrains IDEs and DataGrip. PL/SQL Lint
Flags risky PL/SQL patterns while you type. Oracle Plan Reader
Reads execution plans and points at the slow step. PL/SQL in Practice
Kindle book with practical PL/SQL for working developers.
Nearby errors
Updated 2026-11-12.