Recently, someone asked me why there are so many AWR-like files in the directory and whether they are as useful as the well-known awrrpt.sql. I took the opportunity to explain what I knew about them and their purpose. Since I thought it could be helpful, I decided to share this insight with my readers as well.
If you’re into performance tuning in Oracle, very likey you’ve already used AWR reports. But then you open this directory: $ORACLE_HOME/rdbms/admin …. …and boom – you’re hit with a list of cryptic scripts: awrrpt.sql, awrgdrpi.sql, awrsqrpt.sql, awrextr.sql…
What do they all do?
When should you use which one?
Why are they named like 90s DOS files 🙂 ?
Let’s keep it short and sharp. Here’s your point-to-point breakdown of the most important AWR scripts.
Before you go running any of these scripts – make sure you have the Oracle Diagnostic Pack license.
AWR stuff is not free.
I grouped them into logical chunks – reports, comparisons, SQLs, data movement, etc.
Performance Reports
These are the most common AWR reports you run to analyze performance between 2 snapshots.
| Script | What it does |
|---|---|
awrrpt.sql | Generates AWR report for the current instance (for single instance DBs) |
awrrpti.sql | Same as above, but lets you select another DBID or instance (useful for RAC) |
awrgrpt.sql | AWR Global Report – gives a full RAC-wide view |
awrgrpti.sql | Same as above, but lets you pick another DBID/instance |
Example:
You’re troubleshooting high CPU on node 2 of your RAC? Use awrrpti.sql.
Comparison Reports
These help you compare two different time ranges – maybe before and after a patch, or different load periods.
| Script | What it does |
|---|---|
awrddrpt.sql | Compares two AWR snapshots (date diff) – for a single instance |
awrddrpi.sql | Same as above, for another dbid/instance |
awrgdrpt.sql | Global RAC diff report (current RAC) |
awrgdrpi.sql | Global RAC diff report (another dbid/instance) |
Use these when you wanna say, “Hey, this new code made the DB slower… prove it!”
Want to see what a particular SQL is doing? These are your tools.
| Script | What it does |
|---|---|
awrsqrpt.sql | SQL report for a specific SQL_ID in the current instance |
awrsqrpi.sql | Same thing but lets you pick another dbid/instance |
You’ll be surprised how useful this is when hunting bad queries.
Sometimes, you need to take AWR data from one system and analyze it somewhere else (like test or dev).
| Script | What it does |
|---|---|
awrextr.sql | Export AWR data using datapump |
awrload.sql | Import AWR data using datapump |
This is actually gold when working on performance issues across environments.
Helper / Utility Scripts
These are mostly helper scripts to define input or make reports more automated or interactive.
| Script | What it does |
|---|---|
perfhubrpt.sql | Generates a fancy interactive Performance Hub report |
awrinpnm.sql | Input name helper for AWR |
awrinput.sql | Get inputs before running AWR reports |
awrddinp.sql | Input helper for diff reports |
awrgdinp.sql | Input helper for RAC diff reports |
What’s with these weird script names?
Yeah, all these awrsqrpi.sql, awrgdrpt.sql, etc. – they look like random garbage at first.
But there’s actually some logic.
Here’s how to decode them:
| Abbreviation | Means |
|---|---|
awr | Automatic Workload Repository |
rpt or rp | Report |
i | Lets you select specific instance or DBID |
g | Global report for RAC |
d or dd | Diff reports (comparing two snapshots) |
sq | SQL |
inp | Input helper |
So awrsqrpi.sql = AWR SQL Report for a different instance
And awrgdrpi.sql = AWR Global Diff Report for another DBID/instance
So Which Script Should I Use?
Here’s a quick cheat sheet:
| Task | Script |
|---|---|
| Normal AWR report (single instance) | awrrpt.sql |
| AWR report for RAC (global view) | awrgrpt.sql |
| SQL performance report | awrsqrpt.sql |
| Compare two AWR reports | awrddrpt.sql |
| Export/import AWR data | awrextr.sql and awrload.sql |
If you’re doing anything with RAC – prefer the ones with g in them.
If you’re automating – use the *inp*.sql files.
Final Thoughts
Yes, the names are ugly.
Yes, the syntax is old-school.
But honestly? These AWR scripts are still some of the best tools you have for DB performance analysis.
Just remember:
- Don’t use them without a valid license
- Learn the naming pattern once – and it gets way easier
- Practice running different ones on test systems
And next time someone complains, “The database is slow” … you know exactly which script to run.
Hope It Helped!
Prashant Dixit
Database Architect @RENAPS
Reach us at : https://renaps.com/




