Indicates the internal status of the lock.
Table 2. Snapshot Monitoring InformationSnapshot Level |
Logical Data Grouping |
Monitor Switch |
Lock |
lock |
Basic |
Table 3. Event Monitoring InformationEvent Type |
Logical Data Grouping |
Monitor Switch |
Locking |
- |
- |
Deadlocks1 |
lock |
- |
- 1
- This option has been deprecated. Its
use is no longer recommended and might be removed in a future release.
Use the CREATE EVENT MONITOR FOR LOCKING statement to monitor lock-related
events, such as lock timeouts, lock waits, and deadlocks.
Usage
This element can help explain what
is happening when an application is waiting to obtain a lock on an
object. While it may appear that the application already has a lock
on the object it needs, it may have to wait to obtain a different
type of lock on the same object.
The lock can be in one of the
following statuses:
- G
- Granted state: The application has the lock in the state specified
by the lock_mode monitor element.
- C
- Converting state: The application is trying to change the lock
held to a different type; for example, changing from a share lock
to an exclusive lock.
- W
- Waiting state.
Note: API users should refer to the sqlmon.h header
file containing definitions of database system monitor constants.