Was this helpful?
Example: Who Is Holding Locks?
The following query shows which sessions are holding locks on the local VNODE:
update ima_mib_objects
set    value        = DBMSINFO('IMA_VNODE')
where  classid      = 'exp.gwf.gwm.session.control.add_vnode'
and    instance     = '0'
and    server       = DBMSINFO('IMA_SERVER');
 
select distinct
       lock_id,
       lock_state,
       ima_locklists.locklist_id,
       locklist_server_pid,
       locklist_session_id,
       effective_user,
       db_name,
       session_terminal,
       session_query
from
       ima_locks,
       ima_locklists,
       ima_resources,
       ima_server_sessions
where lock_state != 'WT'
and ima_locks.locklist_id = ima_locklists.locklist_id
and ima_locklists.locklist_server_pid = ima_server_sessions.server_pid
and ima_locklists.locklist_session_id = ima_server_sessions.session_id;
Last modified date: 08/14/2024