Friday, March 9, 2012

Intent exclusive lock problem

Hi,
We have an application that works with SQL Server 2000
and has 20 users. All the users reach 4-5 tables most of
the time.They do select/update/insert very frequently to
those 4-5 tables.
The problem is, 2 or 3 times in a day, all the user
applications stuck with showing hourglasses. They all
stuck at the same time.They cannot go normal processing
until we reset the server machine.When the application
hangs,I control the locks in the SQL Server by calling
sp_lock stored procedure. I saw locks on the heavily
used 4-5 tables in the type TAB and MODE IX. No
transaction in the application needs to update or insert
so many rows to these tables at a time (and it actually
does not insert/update that many rows).
I guess the problem is those ıntent exclusive locks.
Since at the time of blocking all the frequently used
tables are IX locked, no one can select them.So the
application stucks there.
But how those IX locks happens? And why they just go
away from the lock tables after a small amount of time?
Thanks in advance...The table IX locks are normal and are required so that pages or rows can be
exclusively locked (X mode). Your problem sounds like a deadlock in your
application code. If you contact PSS they will be able to help you
(http://support.microsoft.com)
Regards.
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"Caglar Okat" <gypsybregovic@.yahoo.com> wrote in message
news:337801c3fd5b$ecb7b6e0$a001280a@.phx.gbl...
> Hi,
> We have an application that works with SQL Server 2000
> and has 20 users. All the users reach 4-5 tables most of
> the time.They do select/update/insert very frequently to
> those 4-5 tables.
> The problem is, 2 or 3 times in a day, all the user
> applications stuck with showing hourglasses. They all
> stuck at the same time.They cannot go normal processing
> until we reset the server machine.When the application
> hangs,I control the locks in the SQL Server by calling
> sp_lock stored procedure. I saw locks on the heavily
> used 4-5 tables in the type TAB and MODE IX. No
> transaction in the application needs to update or insert
> so many rows to these tables at a time (and it actually
> does not insert/update that many rows).
> I guess the problem is those ıntent exclusive locks.
> Since at the time of blocking all the frequently used
> tables are IX locked, no one can select them.So the
> application stucks there.
> But how those IX locks happens? And why they just go
> away from the lock tables after a small amount of time?
> Thanks in advance...
>|||Paul S Randal [MS] wrote:
> The table IX locks are normal and are required so that pages or rows can b
e
> exclusively locked (X mode). Your problem sounds like a deadlock in your
> application code. If you contact PSS they will be able to help you
> (http://support.microsoft.com)
> Regards.
One day microsoft customers will recognize, that bothering about locks
is no longer needed in other SQL databases due to MVCC, MVTO, MVRC
mechanisms (Firebird, PostgreSQL, LogicSQL, Informix).
Microsoft solves problems, i do not have without microsoft.
regards, Guido Stepken

No comments:

Post a Comment