Oracle error
ORA-00060
ORA-00060: deadlock detected while waiting for resource
What usually causes it
Two sessions each waited for a row the other held. Oracle rolled back one statement, not the whole transaction.
What to check first
The trace file named in the alert log holds the deadlock graph and both statements. The lasting fix is in the application's locking order. Unindexed foreign keys are a common cause of table-level (TM) deadlocks.
Scripts that help
- Alert log errors in the last 24 hoursORA- and TNS- errors plus checkpoint warnings from the alert log, read through SQL. It can be slow when the alert log is very large.
- Where the alert log and trace files areThe ADR home, alert log directory, trace directory and this session's own trace file.
- Foreign keys that are probably not indexedForeign keys whose columns aren't the leading columns of an index. Unindexed foreign keys cause table-level locks when the parent row is updated or…