Does oracle keeps any history about deadlocks?
e.g. Can i know which sqls were executed when the deadlock was detected, and oracle exception ORA-00060 (deadlock detected while waiting for resource) is thrown?
Thanks in advance.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There’s no history built-in to the database, however, when a deadlock occurs, a couple of things happen. First, it gets logged to the alert.log. Second, a trace file is written. So, there’s some history recorded there.
The tracefile will contain many useful bits of information, such as:
– deadlock graph
– SQL that encountered the deadlock
– other statements involved in the deadlock
These pieces of information should help you track down the source of the deadlock.
If you have any specific cases or examples, identify the tracefile, and post the pieces I mentioned above, and I’m sure someone will be able to help you understand what’s going on.
Hope that helps.