Why ORA-00060 Happens

  • Unindexed Foreign Key on a child table causing table-level TM locks during parent DELETE/UPDATE.
  • Two transactions updating the same rows in opposite orders (Row A then Row B vs Row B then Row A).
  • Bitmap index updates in concurrent OLTP transactions or ITL slot exhaustion on hot blocks.

Recommended Resolution

Inspect the deadlock graph in the alert log / trace file (look for TX vs TM lock types). Index all child Foreign Keys online and enforce deterministic row-locking order (ORDER BY id) across application transactions.

SQL Diagnostic & Fix Example

-- Always lock rows in deterministic primary key order
SELECT id FROM accounts WHERE id IN (:id1, :id2) ORDER BY id FOR UPDATE;