Metrics install automatically if you have Redgate Monitor installed.
If you are using Redgate’s SQL Server monitoring tool, Redgate Monitor, you can instantly install and run this metric on your servers.
A blocked session is one waiting on a lock held by another session. A few brief blocks are normal; sustained or growing blocking indicates a contention problem or a long-running transaction that is holding locks.
Required permissions:
GRANT SELECT ON V_$SESSION TO redgate_monitor_user CONTAINER=ALL;
GRANT SELECT ON V_$CONTAINERS TO redgate_monitor_user CONTAINER=ALL;
These are covered by Red gate Monitor’s standard Oracle monitoring user — if it was set up as described in the product documentation, no additional grants are needed.
Metric definition
Name
Blocked Sessions
Description
Counts sessions currently waiting on a blocker, per container. The alert detail text carries the who into the alert itself (blocked SID and username, blocking SID, seconds in wait); to investigate further, query V$SESSION and follow BLOCKING_SESSION back to the holder, then join to V$SQL to see what each session is running.
Supported database engine
- Oracle
The T-SQL query that will collect data
Instances to collect from
Select all monitored Oracle instances
Databases to collect from
Not applicable — Oracle custom metrics collect once per instance, and values are stored per container (PDB) via the con_id column
Collection frequency
60
seconds (collected every minute)
Use collected or calculated values
Leave the Use a calculated rate of change between collections check box unchecked
Metric collection
Enabled
Alert definition
Alert name
Blocked sessions
Description
Raise an alert when the metric value goes
Above the defined threshholds
Default threshold values
| High: | 0 |
| Medium: | |
| Low: |
Raise an alert when the threshold is passed for
2 collections
Alert is
Enabled