Salesforce

How to determine which users are holding record locks on a specific table

« Go Back

Information

 
TitleHow to determine which users are holding record locks on a specific table
URL NameP182366
Article Number000147433
EnvironmentProduct: Progress
Version: 9.x
Product: OpenEdge
Version: 10.x, 11.x, 12.x
OS: All supported platforms
Question/Problem Description
How to determine which users are holding record locks on a specific table
How to find the userids of the users holding locks on a given table
How to list all of the current record locks for a specific table.
Steps to Reproduce
Clarifying Information
Error Message
Defect Number
Enhancement Number
Cause
Resolution
This can be done either via Promon or via virtual system tables (VSTs), although using the _Lock VST 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 identified by 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.
Workaround
Notes
_Lock._Lock-Usr = ? means the VST lock "record" is currently not in use. Unused locks will all always be at the end of the table - there will not be a used "record" after the first one that reports unknowns.
 
References to Other Documentation:
 
Progress Articles:
 
Keyword Phrase
Last Modified Date3/3/2021 8:57 PM

Powered by