Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: What is the implications of Level# for a latch?
"Niraj Mehta" <mehta_niraj_at_hotmail.com> wrote in message news:<9md1qb$des$1_at_newsreader.mailgate.org>...
> Hello,
>
> I have been searching extensively in the Oracle documentation, what exactly
> does the Level# for a latch (in V$LATCH view) imply.
Latches have a Level# that is used to prevent deadlocks. Once a process acquires a latch at a certain level#, it cannot then subsequently acquire another latch at the same or a lesser level (unless it acquires it nowait).
Try out this scenario and you will see that you cannot create a deadlock, if you keep the above rule in mind: Latch Level#
A 1 B 3 C 3 D 4 E 6 F 6
... If you use this logic in designing locking for the tables. You can virtually eliminate table deadlocks. That is, if you set a rule for your developers to only lock tables in a certain order, there is no way they can code a deadlock.
:0)
Anurag
Received on Mon Aug 27 2001 - 09:41:54 CDT