syslocks table
Posted in 2004
Topics: General Discussion
Hi,
When I run the command:
select * from syslocks
I get the following output:
dbsname prime
tabname applog
rowidlk 0
keynum 0
type X
owner 7419
waiter
How can I tell if the lock is at table, page or row level?
Thanks,
Vasilis
On Fri, 10 Sep 2004 08:31:53 -0400, Vasilis Economides wrote:
> Hi,
>
> When I run the command:
>
> select * from syslocks>
> I get the following output:
>
> dbsname prime
> tabname applog
> rowidlk 0
ROWID will be non-zero if this is a lower level lock than table level.
Either row or page level depending on the lockmode of the table.
> keynum 0
KEYNUM will be non-zero if this is a key lock.
> type X
> owner 7419
> waiter
So, the lock above would be an exclusive table lock.
>
> How can I tell if the lock is at table, page or row level?
Look at the systables record for the table. If the table's lock mode is 'P'
or page, then any ROW level lock will actually be a page level lock. IIRC,
the lowest 8 bits of the rowid will be zero if it's a page lock but that's no
easier than looking up the table's locking mode, so...
Art S. Kagel
> Thanks,
>
> Vasilis