This view shows the status of locks held or being requested by Adaptive Server processes as of the end of the most recent sample interval. Each lock is identified by:
Login name
Process ID
Kernel Process ID of the Adaptive Server process associated with the lock
Name and ID of the object being locked
Name and ID of the database that contains that object
Page number to which the lock applies (if it is a page lock)
Current status of each lock
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 holds the lock are shown. If the process holds the lock, the count of other processes waiting to acquire that lock is shown.
SMC_SIZET process_detail_locks_count = 13;
SMC_DATAITEM_STRUCT process_detail_locks_view[] = {
{ SMC_NAME_LOGIN_NAME, SMC_STAT_VALUE_SAMPLE },
{ SMC_NAME_SPID, SMC_STAT_VALUE_SAMPLE },
{ SMC_NAME_KPID, SMC_STAT_VALUE_SAMPLE },
{ SMC_NAME_DB_NAME, SMC_STAT_VALUE_SAMPLE },
{ SMC_NAME_DB_ID, SMC_STAT_VALUE_SAMPLE },
{ SMC_NAME_OBJ_NAME, SMC_STAT_VALUE_SAMPLE },
{ SMC_NAME_OBJ_ID, SMC_STAT_VALUE_SAMPLE },
{ SMC_NAME_PAGE_NUM, 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 }
};