Re: Row level locking

From: JRStern <JRStern_at_gte.net>
Date: 1999/02/25
Message-ID: <36d4d132.1620470_at_msnews.microsoft.com>#1/1


On Wed, 24 Feb 1999 18:37:07 +0100, "perto" <alberto.pertotti_at_NOSPAM.elsag.it> wrote:
>I start two different sessions:
>Session 1:
>begin tran
>update table set status = 'X' where field = 1
>
>Session 2:
>begin tran
>update table set status = 'Y' where field = 2
>
>Session 2 remains blocked by Session 1. Why? The two update statement works
>on different rows. SS7.0 has the row level locking feature, why an update on
>a row can block an update on another row?
>
>I found a workaround for the problem: everything works OK only when "field"
>is primary key, but this is a very bad limitation.

I agree.

I haven't worked with row level locking yet (but probably will by next week). Can you give an explicit "hint" in the update? Maybe it would help to first do a select with a row-locking hint?

There are still many people in the database world who do not like row level locking, do not understand it, etc. I speak as a row-level locking bigot (in favor of it), of course.

Joshua Stern
JRStern_at_gte.net Received on Thu Feb 25 1999 - 00:00:00 CET

Original text of this message