This is a list of articles I’ve written about understanding and interpreting the Statspack and AWR reports (in many cases the two are effectively interchangeable) plus as few articles on related topics.
I’ve also included a number of articles from other authors in a separate list at the end. Unfortunately the articles on the Oracle website tend to drift around over time so some of the the links may no longer work, even though the article exists somewhere.
At some point the list will be sorted by date of publication (most recent first) and the datestamp will be included with the entry.
From my blog
- Lesser known AWR scripts
- Lesser known Statspack scripts
- Caution with “Timed Events”
- The Top Timed Event
- Comments on “Instance Efficiency Ratios”
- The need to look at base statistics, not ratios
- The Statspack levels
- Threats of Statspack level 6 (in 9i)
- Checking Statspack collection times in 10g
- CPU Used
- Finding the wrong problem
- Scoping and capture problems with statspack
- Report over time how long AWR (originally Statspack) snapshots took to complete.
- Report a single statistic across time from the AWR history of v$sysstat.
- Report a single statistic across time from the AWR history of v$osstat.
- Quick and Dirty example of comparing two statistics across time from the AWR history
- v$resource_limit – including a trend through the AWR history
- Flagging (“coloring”) SQL for special capture in the AWR history
- Case study of using v$active_session_history to explain a parsing problem
- How ASH samples are captured for the dba_hist_active_sess_history.
- Saving Optimizer Stats
- Timed events example from tkprof
- Analysing Statspack 1 – basic strategies
- Analysing Statspack 2 – avoiding ratios
- Analysing Statspack 3 – be cautious about averages
- Analysing Statspack 4 – generating trends from reports
- Analysing Statspack 5 – resource hogs
- Analysing Statspack 6 – Some redo log examples
- Analysing Statspack 7 – System work or user waits
- Analysing Statspack 8 – Reading and cross-checking
- Analysing Statspack 9 – Complete case study
- Analysing Statspack 10 – Context is critical
- Analysing Statspack 11 – Chasing some clues
- Analysing Statspack 12 – A little bit of RAC
- Analysing Statspack 13 – Case Study on Statspack
- Hacking Statspack into 12c
- Case Study – 1 (An example of using the AWR report).
External links
- Graham Wood (Oracle): a pdf file of his presentation on ASH ( v$active_session_history).
- Connie Dialeris Green (Oracle): Diagnosing Performance Bottlenecks using Statspack and the Oracle Performance Method.
- Originally published in 2001, but check the comment I made here in 2008
- Doug Burns: “Comparing current with recent history”.
- Jos Van Den Oord: Statspack Reporting from a Standby database (11g)
- Timur Ahkmadeev Extracting a short term Load Profile from v$sysmetric
Great collection. Thanks.
Comment by Fahd Mirza — February 6, 2011 @ 11:15 am GMT Feb 6,2011 |
The papers at the top of the list from Connie Dialeris Green and Graham Wood seem to drift around as Oracle Corp. re-organizes the TechNet website. At present they are in the “database/focus-areas” directory.
If the current links fail for you, please add a comment so that I can find and relink them.
Comment by Jonathan Lewis — March 9, 2011 @ 9:37 am GMT Mar 9,2011 |
This may also be of interest from Tim Gorman.
http://www.evdbt.com/papers.htm
RDBMS Forensics using ASH
The audio may aslo be available on demand in the near future
as he gave a version of this at the following online confrence.
http://www.brainsurface.com/virtathon/sessions-schedule
Ron
Comment by Ron Chennells — August 4, 2011 @ 1:06 pm BST Aug 4,2011 |
Jonathan,
I recently installed 12c (database) and I’m trying to install statspack. Do you have any insight on the install, particularly around common and local users, and where perfstat would set in this pantheon? Other things to be aware of in this plugable environment for running statspack?
Thanks,
bg
Comment by Bill — July 2, 2013 @ 11:15 pm BST Jul 2,2013 |
Bill,
I hadn’t thought of trying to install statspack on 12c.
Following your comment I’ve taken a quick look at $ORACLE_HOME/rdbms/admin/spdoc.txt and noted a small reference to 12c (which, at the head of the document, calls it 12g ;) )
So there have been some changes for 12c.
There’s also this pair of lines in the spcreate.sql script, although I can find anything in any of the other scripts that relates to it – so perhaps it an internal fiddle to handle the issues of how links between plugged databases and the container database are made.
Comment by Jonathan Lewis — July 3, 2013 @ 9:30 am BST Jul 3,2013 |
Bill,
What sort of problems are you seeing, and what type of install are you doing.
I’ve just done an install into EE without containers; all I did was create a tablespace for the perfstat account, comment out the “_oracle_script” line, and then run spcreate.sql as sys. I’ve taken a couple of snapshots, and produced a report,
Everything seemed to work okay; the only problem was that every wait in my Top 5 looked as if it should have been listed as idle – here’s the list, with their probable timeouts:
Comment by Jonathan Lewis — July 3, 2013 @ 10:44 am BST Jul 3,2013 |
Jonathan,
I’m just logging in as sys and running spcreate and getting:
The spcreate.sql runs to completion and spauto.sql will run and set up the job.
Now the question is what is statspack sampling activity against — the container pdborcl or against all of the database? Given perfstat’s privileges and roles, I’m guessing all of the database. Hum …? Not straight forward.
Might be interesting to globally change perfstat to c##perfstat in the statspack creation scripts and see what happens.
Comment by Bill — July 3, 2013 @ 2:19 pm BST Jul 3,2013 |
Bill,
That’s what I did when I got to a CDB. The snapshot will be for the container, since there is only one library cache, SGA, etc… But that’s the way the AWR works anyway. The interesting thing is what happens when the specific PDB is closed but the CDB is up with a job visible in cdb_jobs.
I did consider messing about with a c##perfstat, but there were a lot of places I’d have to fiddle with the sp scripts.
Comment by Jonathan Lewis — July 3, 2013 @ 7:15 pm BST Jul 3,2013 |
Bill,
Latest update: edit spcusr.sql to comment the line “container=current” in the ‘create user’ statement; execute the “alter session” command from the spcreate.sql script running the script, and you can install perfstat as a common user in the CDB$ROOT.
Comment by Jonathan Lewis — July 5, 2013 @ 8:56 am BST Jul 5,2013 |
Jonathan,
Thanks. I’ll give this a try when I have a moment. I have also been following and adding to this topic discussed on otn, as I see you have.
bg
Comment by Bill Gaynor — July 5, 2013 @ 4:03 pm BST Jul 5,2013 |
One more comment. Spauto.sql was run as sys and is running as scheduled. I changed spauto to run every 15 minutes.
Not sure why there is a gap in the snap_id.
Comment by Bill — July 3, 2013 @ 2:54 pm BST Jul 3,2013 |
Bill,
The gap in the snap id is a relatively common phenomenon. The sequence used by statspack has a cache size of 10, so if it gets flushed out of the library cache you can lose values. I’ve often suggested to people that they change to nocache on that sequence to avoid losing values (this allows you to cheat a little bit with “difference” SQL). On the other hand if you leave the cache at 10 it can give you a little threat warning that you have pressure on the shared pool if you see some sort of persistent pattern of gaps (e.g. the snap_id jumps by 10 between 8:30 pm and 10:15 pm, but doesn’t have gaps at any other time of day).
Comment by Jonathan Lewis — July 3, 2013 @ 7:19 pm BST Jul 3,2013 |
Hello All,
Just two little questions.
– Statspack is free in oracle 12C ? or we must to buy Diagnostic pack ?
– If it is free, it’s easy to install it on 12C ?
Thank you for your comments.
Comment by Yannick — October 27, 2014 @ 11:00 am GMT Oct 27,2014 |