Search notes:

Oracle: DBMS_LOCK_ALLOCATED

dbms_lock_allocated is a table that is populated when a locks are requested using dbms_lock.allocate_unique or dbms_locak.allocate_unique_autonomous.
select
   lck.type               lock_type,
   dla.name,
   lck.lmode,
   lck.request,
   round(lck.ctime / 100) tim,
   lck.block,
   dla.lockid,
   lck.sid,
   round(dla.expiration - sysdate, 1) exp_in_days
from
   dbms_lock_allocated dla   left join
   gv$lock             lck on dla.lockid = lck.id1;

Cleaning up

Records where expiration is less than sysdate are deleted by dbms_lock.allocate_unique or dbms_locak.allocate_unique_autonomous on every 100th attempt to create a new entry.

See also

MOS Note 840840.1

Index