Blocking Session Count

Description

This is a database-level metric. For Oracle Real Application Clusters databases, this metric is monitored at the cluster database target level and not by member instances.

This metric signifies that a database user is blocking at least one other user from performing an action, such as updating a table. An alert is generated if the number of consecutive blocking occurrences reaches the specified value. The sessions being blocked can come from different instances.

Note: The catblock.sql script needs to be run on the managed database prior to using the User Blocks test. This script creates some additional tables, view, and public synonyms that are required by the User Blocks test.

Metric Summary

The following table shows how often the metric's value is collected and compared against the default thresholds. The 'Consecutive Number of Occurrences Preceding Notification' column indicates the consecutive number of times the comparison against thresholds should hold TRUE before an alert is generated.

Target Version

Evaluation and Collection Frequency

Upload Frequency

Operator

Default Warning Threshold

Default Critical Threshold

Consecutive Number of Occurrences Preceding Notification

Alert Text

8.1.7.4; 9.0.1.x; 9.2.0.x

Every 5 Minutes

Not Uploaded

>

11

Not Defined

3

Session %sid% blocking %value% other sessions.

Target Version

Server Evaluation Frequency

Collection Frequency

Upload Frequency

Operator

Default Warning Threshold

Default Critical Threshold

Consecutive Number of Occurrences Preceding Notification

Alert Text

10.1.0.x

Every Minute

Every 15 Minutes

After Every Sample

>

11

Not Defined

3

Generated By Database Server

Data Source

SELECT blocking_sid, num_blocked
           FROM ( SELECT blocking_sid, SUM(num_blocked) num_blocked
           FROM ( SELECT l.id1, l.id2,
                         MAX(DECODE(l.block, 1, i.instance_name||'-'||l.sid,
                         2, i.instance_name||'-'||l.sid, 0 )) blocking_sid,
                         SUM(DECODE(l.request, 0, 0, 1 )) num_blocked
                   FROM gv$lock l, gv$instance i
                   WHERE ( l.block!= 0 OR l.request > 0 ) AND
                           l.inst_id = i.inst_id
                           GROUP BY l.id1, l.id2)
           GROUP BY blocking_sid
           ORDER BY num_blocked DESC)
           WHERE num_blocked != 0 

User Action

Either have the user who is blocking other users rollback the transaction, or wait until the blocking transaction has been committed.

Related Topics

About Alerts

About the Metric Detail Page

Editing Thresholds

Understanding Line Charts