Oracle Deadlock Analyzer (ORA-00060)
Paste the trace of an ORA-00060 deadlock. dbCove AI reads the deadlock graph, says why the cycle formed and gives the change that stops it.
Also forSQL ServerOraclePostgreSQLMySQL
How to get the deadlock trace
The alert log names the trace file right after ORA-00060. The folder:
SELECT value FROM v$diag_info WHERE name = 'Diag Trace';From DEADLOCK DETECTED through the Deadlock graph, Rows waited on and the session information of both sides.
Every ORA-00060 in the alert log:
adrci> show alert -p "message_text like '%ORA-00060%'"What it looks for in an Oracle deadlock
Two sessions updating the same rows in opposite order: a lock order fix in the application.
A block short of ITL slots, a unique key both sessions insert, or a bitmap index under concurrent DML.
An unindexed foreign key: a parent delete or key update locks the whole child table.
The object, file, block and row each session waited for.
The SQL each session ran, and the program and machine it came from.
Read nextenq: TM - contention and the unindexed foreign key
This was one deadlock. dbCove catches every one.
On your own databases dbCove records every deadlock with the statements on both sides, groups them by pattern, and its AI explains them as they happen. Free for 2 databases of each engine.
Questions
Is what I paste kept?
It is sent to our AI provider to be explained and kept by us for up to 12 months to improve the tools; the AI provider does not keep it or train on it. Remove passwords and personal data before you paste.
Does Oracle roll back the whole transaction?
No. Oracle rolls back the one statement that detected the deadlock and raises ORA-00060. The transaction keeps its other locks until the application commits or rolls back.
Is it always the application?
Mostly, but not only. TX waits in S mode point to the database side: ITL slots, unique keys or bitmap indexes. TM waits point to a missing foreign key index. The answer says which one it is.
Which versions does it read?
Oracle Database 11g to 23ai, on any edition, single instance or RAC.