Re: record lock
"xixi" <dai_xi@yahoo.com> wrote in message
news:c0f33a17.0402121150.7e578575@posting.google.c om...
> from db2 information center, guidelines for locking, i get this
> excerpt
>
> Close cursors to release the locks that they hold.
> When you close a cursor with the CLOSE CURSOR statement that includes
> the WITH RELEASE clause, the database manager attempts to release all
> read locks that have been held for the cursor. Table read locks are
> IS, S, and U table locks. Row-read locks are S, NS, and U row locks.
> Block-read locks are IS, S, and U block locks.
>
> The WITH RELEASE clause has no effect on cursors that are operating
> under the CS or UR isolation levels. When specified for cursors that
> are operating under the RS or RR isolation levels, the WITH RELEASE
> clause ends some of the guarantees of those isolation levels.
> Specifically, a RS cursor may experience the nonrepeatable read
> phenomenon, and a RR cursor may experience either the nonrepeatable
> read or phantom read phenomenon.
>
> for my case, i have two different cursor, one is holding U lock, the
> other one is IS lock, why i close the IS lock cursor will affect U
> lock?
See my other post ...
>i don't understand the meaning of the guideline, the close
> cursor means any cursor close will release the lock?
No. When you need to use RS or RR isolation levels, you use this because you
want to get away the nonrepeatable read or phantom read, the db server need
to guarantee this. Some locks will be kept until the end of the transaction.
>Please help.
> thanks a lot |