Blocking Session Count

Description

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.

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.

Note: Unlike most metrics, which accept thresholds as real numbers, this metric can only accept an integer as a threshold.

Metric Summary

The rest of the information in this section is only valid for this metric when it appears in either the Enterprise Manager Grid Control or the Enterprise Manager Database Control (if applicable).

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

pre-10g

Every 5 Minutes

Not Uploaded

>

0

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; 10.2.0.x; 11.1.0.x; 11.2.0.x

Every Minute

Not Defined

After Every Sample

>

0

Not Defined

15

Generated By Database Server

Multiple Thresholds

For this metric you can set different warning and critical threshold values for each "Blocking Session ID" object.

If warning or critical threshold values are currently set for any "Blocking Session ID" object, those thresholds can be viewed on the Metric Detail page for this metric.

To specify or change warning or critical threshold values for each "Blocking Session ID" object, use the Edit Thresholds page. See Editing Thresholds for information on accessing the Edit Thresholds page.

Data Source

SELECT SUM(num_blocked) 
  FROM (SELECT id1, id2, MAX(DECODE(block, 1, sid, 0)) blocking_sid, 
     SUM(DECODE(request, 0, 0, 1)) num_blocked 
     FROM v$lock 
        WHERE block = 1 OR request>0 
        GROUP BY id1, id2) 
  GROUP BY blocking SID

User Action

Either have 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