Promoted Locks
Posted in 1999
Topics: General Discussion
Hi all, Q1 : What are promoted locks ? Q2: When can we use with hold cursor for updating the table ? Thanx for the help. Anil Khanna Software Engineer InfoGain India Ltd. e-mail : anilk@india.Infogain.com anilkhanna@hotmail.com For what is the best choice, for each individual is the highest it is possible for him to achieve.
Anil Khanna wrote: > > Hi all, > > Q1 : What are promoted locks ? > Q2: When can we use with hold cursor for updating the table ? Lock promotion happens when a shared lock is promoted to an update or exclusive lock when a row held for update, or by the current isolation level, is actually updated and kept until the transaction is committed or rolled back. You do not have to do anything. A CURSOR...FOR UPDATE will take a shared lock on any row touch, the duration of the lock depends on isolation level (ex DIRTY READ only takes a shared lock on the row current to the cursor and drops it when you fetch the next row). Art S. Kagel