Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: deadlock detection/resolving

Re: deadlock detection/resolving

From: Marc Blum <marc_at_marcblum.de>
Date: Fri, 19 Apr 2002 19:28:19 GMT
Message-ID: <3cc06eda.4388139@news.online.de>


On 19 Apr 2002 17:21:56 +0200, =?ISO-8859-1?Q?R=FCdiger_J._Schulz?= <johannes.schulz_at_web.de> wrote:

>- there are only two connections
> (started with benthic-software "golden")
>t1:
> update artikel set bezeichnung = 'WURST'
> where artnr = 127493;
>t2:
> update artikel set bezeichnung = 'WURST'
> where artnr = 127494;
>t1:
> update artikel set bezeichnung = 'KÄSE'
> where artnr = 127494;
>t2:
> update artikel set bezeichnung = 'KÄSE'
> where artnr = 127493;
>
>
>--> look at the artnr !!
>
>
>now there's a deadlock! all that I want is that oracle
>resolves it automatic...
>

What you post here, is THE classic example for provoking a dead lock. I just use a similar example in my classes. Be happy, that Oracle resolves it by killing one statement. Other databases just let them hang and some DBA has to kill the sessions manually.

I strongly recommend Tom Kyte book and the chapters about locks and transactions.

regards
Marc Blum
mailto:marc_at_marcblum.de
http://www.marcblum.de Received on Fri Apr 19 2002 - 14:28:19 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US