How to Export Oracle Database AWR Reports (awrrpt.sql and awrrpti.sql)

An Oracle Automatic Workload Repository (AWR) report summarizes instance load profiles, foreground and background wait events, Top SQL statements, tablespace/datafile I/O latency, memory advisories, and RAC Global Cache interconnect statistics across two snapshots. Exporting in HTML format (.html) is recommended so all structured tables remain intact for automated analysis.

Before You Begin

  • Generating AWR reports requires an Oracle Diagnostics Pack license on Enterprise Edition and a session with SYSDBA or ADVISOR / SELECT_CATALOG_ROLE privileges.
  • Choosing the snapshot window: Pick a focused 15–60 minute window covering the incident or peak load rather than a multi-day span that averages out spikes. The start and end snapshots must not straddle an instance restart.
  • 12c / 19c Multitenant (CDB / PDB): For instance-wide CPU, I/O, redo, and RAC interconnect analysis, run the report from CDB$ROOT.

Export an Instance AWR Report via SQL*Plus

  1. Sign in to the database host as the oracle user, change to a writable output directory such as /tmp, and launch SQL*Plus:
    su - oracle
    cd /tmp
    sqlplus / as sysdba
  2. Run the standard AWR report script:
    SQL> @?/rdbms/admin/awrrpt.sql
  3. Respond to the interactive prompts:
    • report_type: Enter html (default).
    • num_days: Enter the number of days of snapshots to list (for example, 1 or 2).
    • begin_snap and end_snap: Enter the beginning and ending Snap Id values for the target window.
    • report_name: Press Enter to accept the default filename (such as awrrpt_1_3917_3918.html).
  4. Type exit to leave SQL*Plus and download the generated .html file from /tmp.

Oracle RAC Multi-Instance Tip

On Oracle RAC clusters experiencing interconnect latency, gc blocks lost, or node skew, use awrrpti.sql to export matching snapshot windows for each RAC instance from a single session:

SQL> @?/rdbms/admin/awrrpti.sql

Specify each Instance Number in turn (for example, Instance 1 and Instance 2 over the same snapshot range) so both nodes can be inspected side by side.

34 views Updated 2026-11-19

More in this groupOracle

View all 3 in this group

Can't find an answer?

Upload a log for AI diagnosis, or ask the AI assistant directly in the console.