Home / Oracle Errors / ORA-00060

ORA-00060

Deadlock detected while waiting for resource

What it means

Two sessions each hold a lock the other one needs. Oracle rolls back one statement to break the deadlock.

Common causes

How to fix it

  1. Open the trace file named in the alert log and read the deadlock graph to see the two sessions and SQL
  2. Make every transaction touch tables and rows in the same order
  3. Index foreign key columns so child-table locks stay small
  4. Retry the failed transaction in the application

How to prevent it

Keep transactions short and always lock in a consistent order.

Still stuck? Ask the community in Q&A.

Get the weekly Vismo digestNew Oracle articles and Q&A in your inbox. No spam.

One email a week. Unsubscribe any time.