How to avoid deadlocks?

Community ForumCategory: DatabaseHow to avoid deadlocks?
matheusdba Staff asked 1 month ago

How to avoid deadlocks caused due to row lock contention?

1 Answers
Best Answer
matheusdba Staff answered 1 month ago

Quick answer: Fix your application.
Deadlocks are in general unpredicted situations where session A waits for session B and vice-versa, in a why it will never be resolved.
Please don’t mistake regular locks (healthy mechanism) with deadlocks (you-messed-up mechanism). Also, be aware Oracle automatically kills deadlocks since 10g.
If you have deadlock kills messages in your alert lock, report the trace files with the SQLs to your Dev Team. Some “table-tests” are required from their side. 🙂