Database Tuning (MOSC)

MOSC Banner

Pro-active Deadlock Avoidance Strategy

edited Mar 8, 2012 1:33AM in Database Tuning (MOSC) 14 commentsAnswered
Is there a tool to help application developers avoid deadlock situations caused by accessing tables in an inconsistent order?
What I'm looking for is a tool that would allow me to trace the locking behavior of specific operations in my application so that I can see what resources are locked in what order.  Then by comparing operations that could possibly occur in parallel, I could identify those operations that might lead to deadlocks pro-actively.

I looked at the V$LOCK view, but I'm not sure that I can guarantee that even if I order by the CTIME field that I'll be seeing the correct ordering of the lock operations.  My thought would be that I could instrument my code to see what objects are locked (and in what order) by running a suitable query prior to the commit of each of the operations I want to instrument.

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center