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: Transaction level commits?

Re: Transaction level commits?

From: Doug Cowles <dcowles_at_nospambigfoot.com>
Date: Fri, 15 Oct 1999 16:05:17 -0400
Message-ID: <380788FC.9F059421@nospambigfoot.com>


Actually, what seems to happen when I actually try this, is that TXN B just sits there blocked. Am I not waiting long enough? Is the block indefinite, or after a period of time (how long), will the deadlock ensue. I thought deadlock was only for deadly embrace situations where TXN A was also waiting on TXN B. In the example below, TXN A isn't dependent on TXN B, it's just not doing anything with it's lock. Any comment?

Jonathan Lewis wrote:

> In you example (which would have to be
> rewritten so that TXN B was handled through
> a separately declared procedure), you would
> get a deadlock error detected.
>
> Comments in line.
>
> --
>
> Jonathan Lewis
> Yet another Oracle-related web site: http://www.jlcomp.demon.co.uk
>
> Doug Cowles wrote in message <37FED08E.6523AD1C_at_nospambigfoot.com>...
> >Maybe..I'm not sure. The essential question is :
> >
> >TXN A
> > Select * for update from x where id =y
> -- ROW Y is now locked
> > TXN B
> -- A completely independent transaction
> space
> > update x where id =y
> -- Want to lock row Y, which is already
> locked
> -- Owning transaction recognised as hold
> -- ORA-00060 raised
> > commit
> > END TXNB
> > ??? Is row y in table x still locked for update
> here???????????????
>
> -- if TXN B was surrounded by an exception
> handler
> -- to trap 00060, then TXN A woudl still be
> holding
> -- a lock on row Y
> >
> > update x where id =y
> > commit
> >END TXN A


Received on Fri Oct 15 1999 - 15:05:17 CDT

Original text of this message

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