On Oct 4, 11:30 am, praveen <pillai.prav...@gmail.comwrote:
Quote:
Hi Mark,
Thanks for your response.
A few queries -
1. As per the definition provided on the IBM DB2 website, if a
particular application has an IS lock on a table, other applications
can read or update the table. But as per your answer, someone else
cannot get an exclusive lock on the table (which is needed for
update). This seems contradictory. Am I missing something here?
>
2. Can multiple NS row locks cause an escalation to a table lock?
>
We are facing a production scenario with sufficient number of
deadlocks/timeouts. So your help will be greatly appreciated.
Thanks
Praveen
>
On Oct 3, 11:03 pm, "Mark A" <nob...@nowhere.comwrote:
>
Quote:
"praveen" <pillai.prav...@gmail.comwrote in message
>
Quote:
news:1191452726.344050.299530@w3g2000hsg.googlegro ups.com...
>
Quote:
Quote:
Hi
When does DB2 go for an IS (Intent Share) lock?
>
Quote:
Quote:
IS mode is defined as a mode in which "The lock owner can read data in
the locked table, but cannot update this data. Other applications can
read or update the table."
Why are concurrent applications allowed to update the table but the
lock owner is not?
>
Quote:
Quote:
In a normal SELECT query, it is observed that DB2 goes for NS (Next
Key Share) locks on the selected rows and an IS lock on the table.
What is the significance of the IS lock here?
>
>
Quote:
This prevents someone else from getting an exclusive lock on the table,
either from lock escalation of multiple exclusive row locks, or from an
explicit lock table statement (in exclusive mode).
>
Quote:
Multiple IS locks on the same table are OK and do not interfere with each
other.
>
Quote:
You worry too much.
You might be observing lock escalations due to unavailability of
sufficient memory for any new locks. Two primary parameters that
control lock memory is 'locklist' and 'maxlocks'. Both are DB CFG.
What are your values. Make sure you have a high enough value for
MAXLOCKS (40-60) and then increase locklist by 20% till your
escalation messages go away.
Deadlocks can be because of several reasons. You can dig into details
only after you have got rid of all lock escalations. Basically,
applications are now holding locks larger than they require. After
your lock escalation problems are sorted out, turn db2 deadlock event
monitor and start analyzing individual situations. It is normal and
expected to have infrequent deadlocks in any database. Don't be
alarmed if you see a few every now and then.
~sanjuro