Oracle · DBA_HIST_ACTIVE_SESS_HISTORY

The blocking-sessions tree, rebuilt from history.

V$ views only show blocking right now. This reads the ASH samples Oracle already kept in AWR and rebuilds who blocked whom for any past window — a click-through tree and a per-session timeline, in one self-contained, read-only HTML file.

Read-only, zero DB footprint One offline HTML file

Run it for a time range

Point it at a window. Get one HTML file.

Give it an incident window in ISO time. It queries ASH read-only and writes a self-contained report into reports/ — nothing else to install.

~/ash_blocking_sessions
# 1 — clone
$ git clone https://github.com/davidbudac/ash_blocking_sessions.git
$ cd ash_blocking_sessions

# 2 — build the report for a specific window (ISO time, uppercase T)
$ ./run_report.sh "/ as sysdba" 2026-07-01T13:30:00 2026-07-01T15:30:00

# 3 — open the file it wrote
$ open reports/ash_blocking_*.html

Arg 1 is the sqlplus connect string — "/ as sysdba", or a common user with SELECT_CATALOG_ROLE (works against a remote DB over EZConnect too). Args 2–3 are the window in YYYY-MM-DDTHH24:MI:SS; omit them for the last 2 hours. Needs Oracle 12.2+ with the Diagnostics Pack and a window still inside AWR retention.

↓ what those commands produce

The report it writes — live.

Open full report ↗
file:// reports/ash_blocking_<ts>.html  ·  self-contained, offline Open full report
Loading the interactive report…
no network required
421
blocked samples
~1h10m
blocked session-time
17
waiting sessions
9
blocking sessions
8
wait chains
3
deepest chain
16
peak concurrent

Read the verdict up top, then click a timeline cell to open the blocking tree at that ASH sample — here, session 1:287 (ETL_LOAD) sat idle holding a row lock (uncommitted transaction), causing ~20 min of blocked time across 3 waiters.

Production stance

Read-only. Nothing is installed in your database.

on the DB One read-only query

  • SELECTs only against DBA_HIST_*, CDB_USERS, CDB_OBJECTS, V$DATABASE.
  • Needs only CREATE SESSION + SELECT_CATALOG_ROLE — or connect as SYSDBA.

never happens No footprint

  • No DDL, DML, tables, or directory objects — the JSON is printed to stdout.
  • No server-side files written — the HTML is assembled on your machine.