DBA SGA Active Session History
Description:
Active session history from the SGA.
Parameter ‘Blocked Sessions only’ allows a blocking scenario root cause analysis, e.g. by doing a pivot in Excel (see example in the online library). The link to blocking sessions is deliberately nonunique without jointing to sample_id to increase the chance to fetch the blocking session’s additional information such as module, action and client_id. In some cases, such as row lock scenarios, the blocking session is idle and does not show up in the ASH then. For scenarios where the blocking sessions are active and part of the ASH, Tanel Poder has a treewalk ash_wait_chains.sql, showing the whole chain of ASH records linked by a unique join, including the sample_id: https://blog.tanelpoder.com/2013/11/06/diagnosing-buffer-busy-waits-with-the-ash_wait_chains-sql-script-v0-2/
We recommend doing ASH performance analysis with a pivot in Excel rather than by SQL, as Excel’s drag- and drop is a lot faster than typing commands manually. A typical use case is to analyze which EBS application user waited for how many seconds in which forms UI and to drill down further into the SQL or wait event root causes.
Column ‘Module Name’ shows either the translated EBS module display name or, e.g. for background sessions, the process name (from the program column) to enable pivoting by this column only. Oracle’s background process names are listed here: https://docs.oracle.com/database/121/REFRN/GUID-86184690-5531-405F-AA05-BB935F57B76D.htm#REFRN104
To identify an object or segment of a hot block, for example causing wait events, Oracle’s dba_extents view is unusable due to performance bugs in 19c+, and Franck Pachot published a workaround here: https://www.dbi-services.com/blog/efficiently-query-dba_extents-for-file_id-block_id/
Parameters
User Name, Module Type, Module contains, Show Blocking Session Info, Blocked Sessions only, Request Id, Request Id (multi session), Restrict User Name to Client_ID, From Time, To Time, Code Name starts with, Entry Procedure contains, Wait Event, Exclude Wait Event, SID - Serial#, SQL Id, Max Temp Space larger than GB, Show SQL Text, UI Sessions only, Session Type, Instance Id, Machine, Schema, Action contains, Program contains, Diagnostic Pack enabled
Used tables
gv$sqlarea, obj$, gv$active_session_history, dba_procedures, dba_users
Categories
Related reports
DBA AWR Active Session History, DBA AWR Blocking Session Summary, DBA SGA Blocking Session Summary
Dependencies
If you would like to try one of these Oracle EBS SQLs without having Blitz Report installed, note that some of the reports require functions from utility package xxen_util.
Example Report
DBA SGA Active Session History 24-Sep-2018 011658.xlsx
Report SQL
www.enginatics.com/reports/dba-sga-active-session-history/
Blitz Report™ import options
DBA_SGA_Active_Session_History.xml
Case Study & Technical Analysis
Abstract
The DBA SGA Active Session History report is the primary tool for real-time and near-real-time performance diagnostics in Oracle Database. Unlike AWR reports which provide hourly snapshots persisted to disk, this report queries GV$ACTIVE_SESSION_HISTORY directly from the System Global Area (SGA). This allows for second-by-second analysis of database activity, wait events, and resource consumption for the immediate past (typically the last few hours, depending on buffer size and activity levels).
Technical Analysis
Core Methodology
- Sampling: The database samples the state of all active sessions once per second.
- In-Memory: Data is read from the circular ASH buffer in the SGA. Once the buffer is full, older data is overwritten (and 1 in 10 samples are flushed to AWR on disk).
- Pivot Analysis: The report is designed to be exported to Excel, where users can pivot by
SAMPLE_TIME,WAIT_CLASS,EVENT,SQL_ID, orMODULEto isolate performance bottlenecks.
Blocking Session Analysis
The report includes logic to link blocked sessions to their blockers.
- Limitation: If a blocking session is “Idle” (e.g., a user updated a row but hasn’t committed and went to lunch), it will not appear in the ASH data as an active session, even though it is holding a lock.
- Resolution: The report attempts to provide context, but for complex lock chains, specialized scripts (like Tanel Poder’s
ash_wait_chains) or theDBA Blocking Sessionsreport (which queriesV$SESSIONdirectly) might be needed.
Key Views
GV$ACTIVE_SESSION_HISTORY: The source of truth for recent activity.GV$SQLAREA: Joins to provide SQL text and execution stats.DBA_USERS/DBA_PROCEDURES: Resolves IDs to human-readable names.
Operational Use Cases
- “It’s slow right now”: Diagnosing current performance spikes.
- Root Cause Analysis: Determining who was holding the lock that caused a pile-up 10 minutes ago.
- Application Profiling: Filtering by
MODULE(e.g., ‘eBusiness Suite’) to see where the application spends its time.
Oracle E-Business Suite Reporting Library
We provide an open source Oracle EBS SQLs as a part of operational and project implementation support toolkits for rapid Excel reports generation.
Blitz Report™ is based on Oracle EBS forms technology, and hence requires minimal training. There are no data or performance limitations since the output files are created directly from the database without going through intermediate file formats such as XML.
Blitz Report can be used as BI Publisher and Oracle Discoverer replacement tool. Standard Oracle BI Publisher and Discoverer reports can also be imported into Blitz Report for immediate output to Excel. Typically, reports can be created and version tracked within hours instead of days. The concurrent request output automatically opens upon completion without the need for re-formatting.
The Filters, Columns, Rows and Values fields are used to create and deliver the data in pivot table format with full drill down to details.

The Excel template upload functionality in Blitz Report allows users to create their own layouts by uploading an Excel template with additional sheets and charts, automatically refreshed when the report runs again. This allows to create custom dashboards and more advanced visualizations of report data.

You can download and use Blitz Report free of charge for your first 30 reports.
The installation and implementation process usually takes less than 1 hour; you can refer to our installation and user guides for specific details.
If you would like to optimize your Oracle EBS implementation and or operational reporting you can visit www.enginatics.com to review great ideas and example usage in blog. Or why not try for yourself in our demo environment.
Useful Links
Blitz Report™ – World’s fastest data upload and reporting for Oracle EBS
Oracle Discoverer replacement – importing worksheets into Blitz Report™
Blitz Report™ Questions & Answers
Supply Chain Hub by Blitz Report™
© 2025 Enginatics