Was this helpful?
Example: Lock Tables
The ima_locklists, ima_locks, and ima_resources tables below show information about locks and the resources those locks are for.
Note:  Because the underlying locks are rapidly changing, data in these IMA tables are susceptible to “dirty reads.” This means that querying the same object may return different values due to the underlying data having changed.
register table ima_locklists (
vnode varchar(64) not null not default is
'VNODE',
locklist_id integer4 not null not default is
'exp.dmf.lk.llb_id.id_id',
locklist_logical_count integer4 not null not default is
'exp.dmf.lk.llb_llkb_count',
locklist_status varchar(50) not null not default is
'exp.dmf.lk.llb_status',
locklist_lock_count integer4 not null not default is
'exp.dmf.lk.llb_lkb_count',
locklist_max_locks integer4 not null not default is
'exp.dmf.lk.llb_max_lkb',
locklist_name0 integer4 not null not default is
'exp.dmf.lk.llb_name0',
locklist_name1 integer4 not null not default is
'exp.dmf.lk.llb_name1',
locklist_server_pid integer4 not null not default is
'exp.dmf.lk.llb_pid',
locklist_session_id varchar(32) not null not default is
'exp.dmf.lk.llb_sid',
locklist_wait_id integer4 not null not default is
'exp.dmf.lk.llb_wait_id_id',
locklist_related_llb integer4 not null not default is
'exp.dmf.lk.llb_related_llb',
locklist_related_llb_id_id integer4 not null not default is
'exp.dmf.lk.llb_related_llb_id_id',
locklist_related_count integer4 not null not default is
'exp.dmf.lk.llb_related_count'
)
as import from 'tables'
with dbms = IMA,
structure = unique sortkeyed,
key = (vnode, locklist_id);
 
register table ima_locks (
vnode varchar(64) not null not default is
'VNODE',
lock_id integer4 not null not default is
'exp.dmf.lk.lkb_id.id_id',
lock_request_mode varchar(3) not null not default is
'exp.dmf.lk.lkb_request_mode',
lock_grant_mode varchar(3) not null not default is
'exp.dmf.lk.lkb_grant_mode',
lock_state varchar(20) not null not default is
'exp.dmf.lk.lkb_state',
lock_attributes varchar(30) not null not default is
'exp.dmf.lk.lkb_attribute',
resource_id integer4 not null not default is
'exp.dmf.lk.lkb_rsb_id_id',
locklist_id integer4 not null not default is
'exp.dmf.lk.lkb_llb_id_id'
)
as import from 'tables'
with dbms = IMA,
structure = unique sortkeyed,
key = (vnode, lock_id);
 
Note:  In the ima_locks table, state 1 = granted, 2 = convert and 3 = waiting.
register table ima_resources (
vnode varchar(64) not null not default is
'VNODE',
resource_id integer4 not null not default is
'exp.dmf.lk.rsb_id.id_id',
resource_grant_mode varchar(3) not null not default is
'exp.dmf.lk.rsb_grant_mode',
resource_convert_mode varchar(3) not null not default is
'exp.dmf.lk.rsb_convert_mode',
resource_key varchar(60) not null not default is
'exp.dmf.lk.rsb_name',
resource_type integer4 not null not default is
'exp.dmf.lk.rsb_name0',
resource_database_id integer4 not null not default is
'exp.dmf.lk.rsb_name1',
resource_table_id integer4 not null not default is
'exp.dmf.lk.rsb_name2',
resource_index_id integer4 not null not default is
'exp.dmf.lk.rsb_name3',
resource_page_number integer4 not null not default is
'exp.dmf.lk.rsb_name4',
resource_row_id integer4 not null not default is
'exp.dmf.lk.rsb_name5',
resource_key6 integer4 not null not default is
'exp.dmf.lk.rsb_name6',
resource_lock_id0 integer4 not null not default is
'exp.dmf.lk.rsb_value0',
resource_lock_id1 integer4 not null not default is
'exp.dmf.lk.rsb_value1',
resource_invalid integer4 not null not default is
'exp.dmf.lk.rsb_invalid'
)
as import from 'tables'
with dbms = IMA,
structure = unique sortkeyed,
key = (vnode, resource_id);
Last modified date: 04/03/2024