Using the system table LOCKS, you can determine the following database information, among other things:
·
All locks that are
currently held on the table ROOM
SELECT lockmode,
lockstate, rowidlength, rowidhex, rowid
FROM DOMAIN.LOCKS
WHERE tablename = 'ROOM'
·
All locks
that the current user is holding in the database
session on table
ROOM
SELECT lockmode,
lockstate, rowidlength, rowidhex, rowid
FROM DOMAIN.LOCKS l DOMAIN.CONNECTPARAMETERS
cp
WHERE tablename = 'ROOM'
AND l.session = cp.session
·
All locks
that are currently being held on the table with the hexadecimal internal
identification 0000000000D34BA8
SELECT lockmode,
lockstate, rowidlength, rowidhex, rowid
FROM DOMAIN.LOCKS
WHERE tableid = X'0000000000D34BA8'
If the current user is the database administrator (DBA-Benutzer) or the database system administrator (SYSDBA user), then all currently held locks are shown.
Users that belong to other user class only see the locks held by that one user.