You can generate an AWR Difference Report (AWR Diff Report) using Oracle's standard script awrddrpt.sql available under the Oracle Home directory.
1. Connect as SYSDBA
or
2. Run the AWR Difference Report Script
The script is located at:
Execute it from SQL*Plus:
(? automatically resolves to ORACLE_HOME)
3. Provide Required Inputs
The script will prompt for:
Source Database
Select:
- DBID
- Instance Number
- Begin Snapshot ID
- End Snapshot ID
Example:
Target Database / Comparison Period
Provide another snapshot range:
This can be:
- Same database, different time period
- Different RAC instance
- Different database (if AWR data exists)
4. Choose Report Format
The script will ask:
Example:
5. Specify Output File
Example:
The report gets generated in the current SQL*Plus working directory.
Finding Snapshot IDs
Before running the report, identify snapshot IDs:
For RAC:
Useful Report Types
Compare Good vs Bad Performance
Example:
| Period | Snap Range |
|---|---|
| Good Performance | 100-101 |
| Slow Performance | 200-201 |
Generate AWR Diff Report to identify:
- SQL elapsed time differences
- Wait event changes
- CPU usage increases
- I/O bottlenecks
- Execution plan regressions
Non-Interactive Generation
You can also call the package directly:
For text format:
Quick Check of Available AWR Scripts in Oracle Home
Common scripts:
For a RAC environment, use awrgdrpt.sql instead of awrddrpt.sql when you want to compare cluster-wide performance across snapshot ranges.
No comments:
Post a Comment