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 belongs to database user class DBA or SYSDBA, all locks that are held are displayed.
Users that belong to other user class only see the locks held by that one user.