Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: What's the "DeadLock detected"?
In article <8r95gc$imh$1_at_news.seed.net.tw>,
jonathan_at_ms35.url.com.tw (Trister Yang) wrote:
> Hi,all
>
> I found a error message in my alert.log mean:
>
> ORA-00060: Deadlock detected
>
> what's the "Deadlock detected"???
>
> Any reply I would appreciate!
>
>
"Deadlock detected" indicates that two processes were waiting for resources locked by the other resource, i.e., process A had table X locked and process B had table Y locked, and process A needed access to table Y before unlocking table X and process B needed access to table X before unlocking table Y (this is simplified but should serve to illustrate the point). Neither operation could occur since neither lock could be released, hence a "deadlock".
Oracle 8 resolves these by issuing a rollback for one of the statements involved in the deadlock. (I should imagine that the transaction with the most recent timestamp would be the candidate for the rollback.) Note that the entire transaction is not rolled back, just the work done by the statement involved in the deadlock. (Of course, if there is only one statement in the transaction the entire transaction will be, effectively, rolled back.)
The alert log message notified you that Oracle detected a deadlock situation; since Oracle resolved the deadlock the message was informative. Try to discover which transactions were active at the time the deadlock was detected.
-- David Fitzjarrell Oracle Certified DBA Sent via Deja.com http://www.deja.com/ Before you buy.Received on Mon Oct 02 2000 - 10:04:14 CDT
![]() |
![]() |