A little thought for those who use OEM to generate AWR reports – if you generate the standard HTML form and then try posting it into (say) the OTN database forum when you want some help interpreting it, it won’t look very readable (even if you do remember to put the right tags before and after to reproduce it in fixed font).
So it’s a good idea to know how to produce the text format – which is what I do most of the time (especially since I often end up with a simple telnet or putty session into a client server). Take a look at $ORACLEHOME/rdbms/admin for all the scripts starting with “awr” – there’s quite a lot of them, and the number keeps growing. Apart from finding a script that will give you the standard AWR report in a good old-fashioned text format, you may that newer versions of Oracle include a few useful variations on the theme.
Here’s a list from the 11.2.0.2 home ($ORACLE_HOME/rdbms/admin) with (mostly) the one-line description from the start of file. I’ve put the most useful ones in the first list:
awrrpt.sql -- basic AWR report awrsqrpt.sql -- Standard SQL statement Report awrddrpt.sql -- Period diff on current instance awrrpti.sql -- Workload Repository Report Instance (RAC) awrgrpt.sql -- AWR Global Report (RAC) awrgdrpt.sql -- AWR Global Diff Report (RAC) awrinfo.sql -- Script to output general AWR information
For most people the awrrpt.sql and awrsqrpt.sql are likely to be sufficient, but the “difference between two periods” can be very useful – especially if you do things like regularly forcing an extra snapshot at the start and end of the overnight batch so that you can (when necessary) find the most significant differences in behaviour between the batch runs on two different nights.
If you get into the ‘RAC difference report’ you’ll need a very wide page – and very good eyesight !
There are also a lot of “infrastructure and support” bits – some of the “input” files give you some nice ideas about how you can write your own code to do little jobs like: “run the most recent AWR report automatically”:
awrblmig.sql -- AWR Baseline Migrate awrload.sql -- AWR LOAD: load awr from dump file awrextr.sql -- AWR Extract awrddinp.sql -- Get inputs for diff report awrddrpi.sql -- Workload Repository Compare Periods Report awrgdinp.sql -- Get inputs for global diff reports awrgdrpi.sql -- Workload Repository Global Compare Periods Report awrginp.sql -- AWR Global Input awrgrpti.sql -- Workload Repository RAC (Global) Report awrinpnm.sql -- AWR INput NaMe awrinput.sql -- Get inputs for AWR report awrsqrpi.sql -- Workload Repository SQL Report Instance
I usually carry copies of the scripts with me when I’m troubleshooting in case I need them at client sites – sometimes I’m not allowed the privileges I really need to do rapid troubleshooting, but if I can persuade the DBA to give me execute privileges on package dbms_workload_repository and select privileges on a couple of the necessary tables and views then I can run the reports from an otherwise “minimal” account.
There are also a couple of deceptively named files that you might miss in 11.2:
spawrrac.sql -- Server Performance AWR RAC report spawrio.sql -- AWR IO Intensity Report spadvrpt.sql -- Streams Performance ADVisor RePorT
Although the initial letters in the names suggest that these files might fall in with statspack, they actually report from the AWR tables – however the first one (spawrrac.sql) was only a temporary measure, and prints out the warning message:
This script will be deprecated. The official release of the Global AWR report is awrgrpt.sql
So if you’re using the spawrrac.sql – stop it.


It’s good to know those awr report scripts for RAC.
Comment by sync — February 25, 2011 @ 4:51 am UTC Feb 25,2011 |
Remember everyone, that using AWR – even the command line scripts – requires EE + additional Tuning Pack license for your database.
Statspack is still alive and well worth the money!
Comment by Sam — February 26, 2011 @ 7:14 am UTC Feb 26,2011 |
Tuning pack or Diagnostic Pack?
Comment by Joaquin Gonzalez — March 2, 2011 @ 7:27 am UTC Mar 2,2011 |
I think it might be just the diagnostic pack – but I’d have to check the licence document to be sure.
Comment by Jonathan Lewis — March 3, 2011 @ 9:21 am UTC Mar 3,2011 |
Currently only requires Diagnostic Pack :
http://download.oracle.com/docs/cd/E11882_01/license.112/e10594/options.htm#DBLIC165
Comment by Dom Brooks — May 24, 2011 @ 11:21 am UTC May 24,2011
Currently, the Oracle shop is a mess… No way you can find any information about purchasing diagnostic pack and/or tuning pack. Not even the enterprise manager pack you can find in it, which according to Oracle should be a kind of product group for all of this. I don’t believe this, they can’t put this information clearly and for everybody to unserstand on the web… Can anybody help?
Comment by Xenofon Grigoriadis — September 29, 2011 @ 11:21 am UTC Sep 29,2011
hey , cool awr report script collection!
Comment by Maclean Liu — February 26, 2011 @ 6:24 pm UTC Feb 26,2011 |
[...] AWR Reports: http://jonathanlewis.wordpress.com/2011/02/23/awr-reports/ [...]
Pingback by AWR Reports and Snapshots – Two Very Useful Posts by Jonathan Lewis « Ralph Cavalier's Oracle Blog — March 7, 2011 @ 3:19 pm UTC Mar 7,2011 |