Kbase P24763: How to find out which user is holding a lock in SQL-92?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  10/15/2008 |
|
Status: Verified
GOAL:
How to find out which user is holding a lock in SQL-92
FACT(s) (Environment):
Progress 9.x
OpenEdge 10.x
FIX:
Unlike 4GL, the SQL-92 engine doesn't tell you which user is holding a record lock during a lock conflict. So to find out which user is holding a specific lock you need to query the _Lock table. The following example will show the locks acquired by all users.
SELECT
"_lock"."_Lock-Id",
"_lock"."_Lock-Usr",
"_lock"."_Lock-Name",
"_lock"."_Lock-Type",
"_file"."_file-name",
"_lock"."_Lock-RecId",
"_lock"."_Lock-Chain",
"_lock"."_Lock-Flags",
"_lock"."_Lock-Misc"
FROM
pub."_lock",
pub."_file"
WHERE
"_lock"."_lock-table" > 0
AND "_lock"."_Lock-Table" = "_file"."_file-number";