Scripts to create AWR reports quickly.
Posted by Riyaj Shamsudeen on November 12, 2013
It is easier to create one or two AWR reports quickly using OEM. But, what if you have to create AWR reports for many snapshots? For example, your Oracle support analyst wants you to supply 10 1-hour AWR reports from 10AM to 8PM in a 8 node cluster? That’s about 80 AWR reports to create! Okay, okay, I may(!) be overselling it, but you get the point. It is useful to have a script to create AWR report for all instances for a given range of snapshot IDs. Following scripts are handy:
1. To create one AWR report per instance, for the last snap duration : | awrrpt_all_gen.sql |
2. Same as (1) but in html format : | awrrpt_all_genhtml.sql |
3. To create one AWR report per instance, for a range of snap IDs : | awrrpt_all_range_gen.sql |
4. To create one AWR report, per instance, per snap ID : | awrrpt_all_multi_gen.sql |
Zip file: awrrpt_scripts
These scripts do not modify anything in the database, just retrieves the data using dbms_workload_repository package. Test the scripts to understand further. Of course, you need access to dbms_workload_repository and access to gv$instance.
Gopal Seethepalli said
As always Riyaj explanation about different wait events and his scripts are just amazing and very handy.
basha said
thanks a lot..it saved me a lot of time.
Essy said
The scripts are cool.Thanks
linhtt7509 said
thank you so much! it is so useful to me!!!
kanhaiya said
great job
Srikanth said
Hello Riyaj,
It seems ,awr generated in text fromat, do we have any script to generate them in html format, i have tried replacing .txt with .html in script file, .html files were generated but they are not in readable format.
Riyaj Shamsudeen said
Hi Srikanth
awrrpt_all_genhtml.sql should generate html formatted output. Are you referring to a different script?
Cheers,
Riyaj
trexmaster said
Your scripts just saved me 2 hours of work (6 hourly reports on 10 dbs in a 2-nodes cluster …), tank you so much !
FARA said
Thank,
It’s possible to take it on crontab every hour
Shobhit Jain said
Thanks Riyaj Shamsudeen
Shekhar said
will this work for Oracle 12c container database with PDBs ? Please let me know.
Thanks.