Oracle Deadlock Detection Tool
Starting from 10g, the database now has a built-in static PL / SQL analyzer:
ALTER SESSION SET PLSQL_WARNINGS = 'ENABLE:ALL';
You have google for PLSQL_WARNINGS and you will find useful links
I agree with Matthew, although you can hardly find an analyzer that can effectively detect deadlocks ... there are too many variables in the game.
a source to share
Deadlocks will depend on transactions, not static code. Oracle has no concept of "BEGIN TRANSACTION", so the static analyzer does not know what the starting point of a transaction is. Hypothetically, the parser could be written so that if given the original SQL or PL / SQL statement, it could track all potential execution paths and determine which tables were updated / delete / insert / merge in which order. You can then "compare" two (or more) results of this and determine if there are any where tables are processed in a different order (eg TAB_A, then TAB_B in one and TAB_B, then TAB_A in the other). I suspect this will cause a lot of false positives.
In Oracle, selection is not blocked (except for SELECT ... FOR UPDATE). Thus, deadlocks only occur when updating data, and only when two concurrent transactions try to update the same rows.
a source to share
There is an infinite potential for deadlocks in any database. Therefore, the tool will need usage statistics to know which deadlocks will statistically occur more than once a year. Such a tool would be too complex to justify the development work.
The most common practice would be to set up the database in a Q&A or production environment. And then monitor for any deadlocks that actually occur. You can run automated unit tests against the Q&A environment to simulate load.
a source to share