Database object lock status

This view shows the status of locks on database objects that are held or being requested by Adaptive Server processes as of the end of the most recent sample interval. Each lock is identified by:

Each Adaptive Server process associated with the lock is also identified by its login name, Process ID and Kernel Process ID. The type of lock is shown, together with the current status of the lock and an indication of whether or not this is a demand lock.

If the lock is being requested by the process, the amount of time that this process has waited to acquire the lock and the Process ID of the process that already holds the lock are shown. If the process already holds the lock, the count of other processes waiting to acquire that lock is shown.

SMC_SIZET object_lock_status_count = 14;
SMC_DATAITEM_STRUCT object_lock_status_view[] = {
{ SMC_NAME_DB_ID,                    SMC_STAT_VALUE_SAMPLE },
{ SMC_NAME_DB_NAME,                  SMC_STAT_VALUE_SAMPLE },
{ SMC_NAME_OBJ_ID,                   SMC_STAT_VALUE_SAMPLE },
{ SMC_NAME_OBJ_NAME,                 SMC_STAT_VALUE_SAMPLE },
{ SMC_NAME_PAGE_NUM,                 SMC_STAT_VALUE_SAMPLE },
{ SMC_NAME_LOGIN_NAME,               SMC_STAT_VALUE_SAMPLE },
{ SMC_NAME_SPID,                     SMC_STAT_VALUE_SAMPLE },
{ SMC_NAME_KPID,                     SMC_STAT_VALUE_SAMPLE },
{ SMC_NAME_LOCK_TYPE,                SMC_STAT_VALUE_SAMPLE },
{ SMC_NAME_LOCK_STATUS,              SMC_STAT_VALUE_SAMPLE },
{ SMC_NAME_DEMAND_LOCK,              SMC_STAT_VALUE_SAMPLE },
{ SMC_NAME_TIME_WAITED_ON_LOCK,      SMC_STAT_VALUE_SAMPLE },
{ SMC_NAME_BLOCKING_SPID,            SMC_STAT_VALUE_SAMPLE },
{ SMC_NAME_LOCKS_BEING_BLOCKED_CNT,  SMC_STAT_VALUE_SAMPLE }
};