Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: ORA-600 Deadlock Issues
On 06/25/2005 12:34:02 AM, Egor Starostin wrote:
> Yes. By default, for every deadlock Oracle generates trace file in
> USER_DUMP_DEST (so, you don't need to explicitly 'alter session set
> events...').
The manual says so, but I did see versions of oracle which did not write down a trace file. If he is not getting a trace file, he may have one of those versions. Setting an event is the only way.
> You can find info about how to read deadlock graph in Metalink Note:62365.1
>
> Also note that hanganalyze command will not be helpful in your
> situation. Hanganalyze can only diagnose locks or internal Oracle
> deadlocks.
This is not true:
$ sqlplus scott/tiger
SQL*Plus: Release 10.1.0.4.0 - Production on Sat Jun 25 01:28:19 2005
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.1.0.4.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> lock table emp in exclusive mode;
Table(s) Locked.
SQL> lock table dept in exclusive mode;
SQL*Plus: Release 10.1.0.4.0 - Production on Sat Jun 25 01:28:40 2005
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.1.0.4.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> lock table dept in exclusive mode;
Table(s) Locked.
SQL> lock table emp in exclusive mode;
SCOTT sessions are 33 & 43. Now, take a look at the hanganalyze output below. What are the first two sessions and what are they waiting for?
HANG ANALYSIS:
<0/43/9/0x5bda3990/9376/SQL*Net message from client>
Hanganalyze will go through all the sessions and try to connect the addresses that those sessions are waiting on into a graph. If the graph is circular, there is a problem. It catches everything. Checked and proven. The output of hanganalyze is not particularly useful, though, becuase it will only reveal sessions, not resources that the sessions are waiting on For that, there is a little table called V$SESSION, with hooks to V$SQL.
> Usual application deadlocks Oracle succesfully reveals by
> itself.
That is true, unless you have one of THOSE versions.
-- Mladen Gogala Oracle DBA -- http://www.freelists.org/webpage/oracle-lReceived on Sat Jun 25 2005 - 01:52:23 CDT
![]() |
![]() |