This is a database-level metric. For cluster 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.
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 |
All Versions |
Every 5 Minutes |
Not Uploaded |
> |
0 |
Not Defined |
3 |
Session %sid% blocking %value% other sessions for all instances. |
For this metric you can set different warning and critical threshold values for each "Instance Name - Blocking Session ID" object.
If warning or critical threshold values are currently set for any "Instance Name - 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 "Instance Name - Blocking Session ID" object, use the Edit Thresholds page. See Editing Thresholds for information on accessing the Edit Thresholds page.
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
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
Copyright © 1996, 2009, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.