2081 7

BIT352 ยท 2081 ยท 5 marks

What is Oracle AWR? How AWR report is viewed in oracle?

What is Oracle AWR? How AWR report is viewed in oracle? [5]

Database AdministrationChapter 8: Monitoring, Tuning and PerformanceOracle AWR overview

Quick answer

AWR (Automatic Workload Repository) is a built-in Oracle Database feature that automatically collects, processes, and maintains performance statistics for problem detection and self-tuning purposes.

Oracle AWR (Automatic Workload Repository)

What is Oracle AWR?

Note: The following answer is based on standard Oracle Database documentation, as no specific curriculum notes were provided.

Key Characteristics of AWR:

  • AWR is a repository of historical performance data stored in the SYSAUX tablespace of the Oracle database.
  • It collects snapshots of database performance statistics at regular intervals (default: every 60 minutes).
  • Snapshots are retained for a default period of 8 days, after which they are automatically purged.
  • It is managed by the MMON (Manageability Monitor) background process.

Data Collected by AWR:

CategoryExamples
Wait statisticsTop wait events, wait times
SQL statisticsHigh-load SQL statements
System statisticsCPU usage, I/O, memory
Object statisticsSegment-level access info
Time model statisticsDB time, parse time

Purpose of AWR:

  • Identify performance bottlenecks
  • Compare database performance between two time periods
  • Support the Automatic Database Diagnostic Monitor (ADDM)
  • Assist DBAs in capacity planning and tuning

How AWR Report is Viewed in Oracle

AWR reports can be generated and viewed using the following methods:

Method 1: Using SQL*Plus Script

Oracle provides a built-in script to generate the AWR report:

@$ORACLE_HOME/rdbms/admin/awrrpt.sql

Steps:

  1. Connect to the database as SYSDBA:

    sqlplus / as sysdba
    
  2. Run the AWR report script:

    @$ORACLE_HOME/rdbms/admin/awrrpt.sql
    
  3. The script prompts for:

    • Report format: HTML or TEXT
    • Number of days: to list available snapshots
    • Beginning Snapshot ID
    • Ending Snapshot ID
    • Report filename
  4. The report is saved as an .html or .txt file and can be opened in a browser.


Method 2: Using Oracle Enterprise Manager (OEM)

  • Navigate to: Performance > AWR > AWR Report
  • Select the begin and end snapshot
  • Click Generate Report
  • View the report directly in the browser interface

Method 3: Using DBMS_WORKLOAD_REPOSITORY Package

SELECT output FROM TABLE(
  DBMS_WORKLOAD_REPOSITORY.AWR_REPORT_HTML(
    l_dbid    => &dbid,
    l_inst_num => 1,
    l_bid     => &begin_snap,
    l_eid     => &end_snap
  )
);

Key Sections in an AWR Report:

  1. Report Summary - DB time, load profile
  2. Top 5 Timed Events - Major wait events
  3. SQL Statistics - Top SQL by CPU, elapsed time
  4. Instance Activity Statistics
  5. I/O Statistics
  6. Memory Statistics

Summary

FeatureDetail
Storage locationSYSAUX tablespace
Default snapshot interval60 minutes
Default retention8 days
Background processMMON
Report scriptawrrpt.sql

AWR is a critical tool for Oracle DBAs to diagnose, monitor, and tune database performance effectively.

Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.