You can view the lock table with onstat -k. Figure 39 shows sample output for onstat -k.
Locks address wtlist owner lklist type tblsnum rowid key#/bsiz 300b77d0 0 40074140 0 HDR+S 10002 106 0 300b7828 0 40074140 300b77d0 HDR+S 10197 123 0 300b7854 0 40074140 300b7828 HDR+IX 101e4 0 0 300b78d8 0 40074140 300b7854 HDR+X 101e4 102 0 4 active, 5000 total, 8192 hash buckets
In this example, a user is inserting one row in a table. The user holds the following locks (described in the order shown):
To determine the table to which the lock applies, execute the following SQL statement. For tblsnum, substitute the value shown in the tblsnum field in the onstat -k output.
SELECT tabname
FROM systables
WHERE partnum = hex(tblsnum)
You can also query the syslocks table in the systables database to obtain information on each active lock. The syslocks table contains the following columns.