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 - advice needed

Re: Deadlock - advice needed

From: oliviug <oliviug_at_gmail.com>
Date: 22 Jul 2006 09:42:17 -0700
Message-ID: <1153586537.237619.246210@h48g2000cwc.googlegroups.com>


Don't know. I think it's not needed as it well.

LOCK TABLE in SHARE MODE, would be needed if you want to query and block updates and deletes, which is not the case.

if 4 sessions issue this lock in shared mode would mean that the next statement which require row locking in exclusive mode cannot continue.

would this be the reason of the deadlock ?

HansF wrote:
> On Sat, 22 Jul 2006 09:25:19 -0700, oliviug wrote:
>
> >
> > 2 sessions doing this at the same time:
> >
> > Lock table order_release_bp in share mode;
> >
> > delete from order_release_bp where ...
> >
>
> First question I'd have is ... why is the application issuing a 'lock
> table' command to do the delete?
>
> It may be needed, but in some applications it is simply a symptom of a
> developer 'porting' from SQL Server (or similar) without understanding
> what Oracle does internally.
>
> --
> Hans Forbrich (mailto: Fuzzy.GreyBeard_at_gmail.com)
> *** Feel free to correct me when I'm wrong!
> *** Top posting [replies] guarantees I won't respond.
Received on Sat Jul 22 2006 - 11:42:17 CDT

Original text of this message

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