monLocks

Description

Returns a list of granted locks and pending lock requests.

Enable the enable monitoring configuration parameter for this monitoring table to collect data.

Columns

The columns for monLocks are:

Name

Datatype

Attributes

Description

SPID

smallint

Session process identifier of process holding or requesting the lock.

InstanceID

int

(Cluster environments only) ID of an instance in a shared-disk cluster.

KPID

int

Kernel process identifier

DBID

int

Unique identifier for this database object.

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 context column in syslocks. See the Reference Manual: Tables for information about syslocks.

DBName

varchar(30)

Name of the database for the locked object. This column is NULL if the database is not open when monLocks is queried.

ObjectID

int

Null

Unique identifier for the object

LockState

varchar(20)

Null

Indicates if the lock is granted. Values are:

  • Granted

  • Requested

LockType

varchar(20)

Null

Type of lock. Values are:

  • Exclusive

  • Shared

  • Update

LockLevel

varchar(30)

Null

The type of object for which the lock was requested. Values are:

  • Row

  • Page

  • Table

  • Address

WaitTIme

int

Null

The time (in seconds) for which the lock request was not granted.

PageNumber

int

Null

Page that is locked when LockLevel = 'PAGE'

RowNumber

int

Null

Row that is locked when LockLevel = 'ROW'

BlockedBy

int

If the lock request is blocked, the BlockedBy column is the session process identifier for the process holding the lock that is blocking this lock request. Null if request is not blocked.

BlockedState

varchar(64)

Lock state if the lock being held is blocking other lock requests or if the lock request is blocked. Values are:

  • Blocked

  • Blocking

  • Demand

  • Detached

  • Null (if there is no blocking condition)

SourceCodeID

varchar(30)

For internal use only.