Kbase P182366: How to determine which users are holding record locks on a specific table
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  2/11/2011 |
|
Status: Unverified
GOAL:
How to determine which users are holding record locks on a specific table
GOAL:
How to find the userids of the users holding locks on a given table
GOAL:
Host to list all of the current record locks for a specific table.
FIX:
This can be done either via promon or via vst tables, although using the _lock vst table is not recommended due to performance issues with large -L values.
First run the following 4GL code to determine the table number of the table you wish to query. Change "Customer" to be the table number that you wish to query:
FOR EACH _file WHERE _file._file-name = "Customer" NO-LOCK.
DISPLAY _file._file-number.
Via Promon:
promon -> 4. Record Locking Table -> 1. Display all entries.
Visually scan the Table column for any rows that contain the table number (Table number as per the code above)
Via VST tables:
FOR EACH _Lock:
IF _Lock._Lock-Usr = ? THEN LEAVE.
IF _Lock._Lock-table = 2 THEN /* Change the table number from 2 to the appropriate number as per code above. */
DISPLAY _Lock._Lock-usr _Lock._Lock-name _Lock._Lock-RECID _Lock._Lock-flags WITH WIDTH 132.
END.