Explain Deadlock
Paste a deadlock from SQL Server, Oracle, PostgreSQL or MySQL. dbCove AI shows who blocked whom, why the cycle formed and the change that stops it.
By engineSQL ServerOraclePostgreSQLMySQL
How to get the deadlock
The system_health session keeps the last deadlocks:
SELECT CAST(event_data AS xml) FROM sys.fn_xe_file_target_read_file('system_health*.xel', NULL, NULL, NULL) WHERE object_name = 'xml_deadlock_report';The alert log names the trace file after ORA-00060. Paste the trace from DEADLOCK DETECTED to the end of the session information.
The server log has it, from ERROR: deadlock detected to STATEMENT. Keep log_lock_waits on to see the waits before it.
The last deadlock, in LATEST DETECTED DEADLOCK:
SHOW ENGINE INNODB STATUS;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.
Which deadlocks can it read?
A SQL Server deadlock graph (xml_deadlock_report or an .xdl file), an Oracle trace with ORA-00060, a PostgreSQL deadlock detected log entry, and the LATEST DETECTED DEADLOCK section of MySQL SHOW ENGINE INNODB STATUS.
Is retrying the victim enough?
A retry hides a deadlock, it does not remove it: the same transactions meet again under load. The answer gives the change that breaks the cycle, and a retry only as a safety net.