monLocks

Description

Returns a list of all locks that are being held, and those that have been requested, by any process, for every object. Requires the enable monitoring and wait event timing configuration parameters to be enabled.

Columns

Name

Datatype

Attributes

Description

SPID

smallint

Session process identifier

KPID

int

Kernel process identifier

DBID

int

Unique identifier for the database

ParentSPID

smallint

Parent process ID

LockID

int

Lock object ID

Context

int

Lock context (bit field). These values are the same as for those of the of the context column in syslocks. See the Reference Manual for information about syslocks

ObjectID

int

null

Unique identifier for the object

LockState

varchar(20)

null

Whether the lock has been granted [Granted, Requested]

LockType

varchar(20)

null

Type of lock [‘exclusive table’, ‘shared page’, and so on]

LockLevel

varchar(30)

null

The type of object for which the lock was requested (‘PAGE’, ‘ROW’, and so on)

WaitTIme

int

null

The time (in seconds) that the lock request has not been granted.

PageNumber

int

null

Page that is locked when LockLevel = ‘PAGE’

RowNumber

int

null

Row that is locked when LockLevel = ‘ROW’