Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

Free Oracle Tips

HTML Text

 Home
 E-mail Us
 Oracle Articles


 Oracle Training
 Oracle News

 Oracle Forum
 Class Catalog


 Our Staff
 Our Prices
 Help Wanted!

 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 UNIX
 Oracle UNIX
 Linux
 Oracle Linux
 Monitoring
 Remote help

 Remote plans
 Remote
services
 Oracle C++
 Oracle Java
 Apache
 JDeveloper
 App Server

 Applications
 Oracle Forms
 Oracle Portal
 11i Upgrades
 SQL Server
 Oracle Concepts
 HTML-DB Tips
 Software Help

 Remote Help  
 Development  

 Implementation


 Financials Training
 Oracle 11i
 Oracle Apps 11i
 Oracle Workflow
 Oracle AR 11i Class
 Oracle AP 11i class
 Oracle GL 11i class
 Oracle HR 11i class
 Oracle FA 11i class
 11i Project Mgt
 11i procurement
 11i collections


 Oracle Posters
 Oracle Books

 Oracle Tuning Book
 Oracle RAC Book
 Oracle Security
 Easy Oracle Books
 Oracle Scripts
 SQL Server DBA
 SQL Design Patterns
 Ion
 Excel-DB   


 BC Oracle News


 Rednecks!
 Dress code
 Arabian Stallion

 Burleson Arabians
 Guide Horses
 Don Burleson Blog
 Golf & Travel


 Privacy Policy
 

 

 
 

Oracle AWR Exception Reporting


Oracle Tips by Burleson Consulting

AWR Report

Exception Reporting with the AWR

At the highest level, exception reporting involved adding a WHERE clause to a data dictionary query to eliminate values that fall beneath a pre-defined threshold.  For a simple example, this can be done quite easily with a generic script to read dba_hist_sysstat.

 

AWR uses a "Top N" method which defaults to collect the Top-30 SQL statements for each SQL category (statistics_level=typical).  If you set statistics_level = all, AWR will collect the top 100 SQL statements.

 

The following simple script called rpt_sysstat_10g.sql displays a time-series exception report for any statistic in dba_hist_sysstat.  The script accepts the statistics number and the value threshold for the exception report.

 

<      rpt_sysstat_10g.sql

 

 

prompt

prompt  This will query the dba_hist_sysstat view to display all values

prompt  that exceed the value specified in

prompt  the "where" clause of the query.

prompt

 

set pages 999

 

break on snap_time skip 2

 

accept stat_name   char   prompt 'Enter Statistic Name:  ';

accept stat_value  number prompt 'Enter Statistics Threshold value:  ';

 

 

col snap_time   format a19

col value       format 999,999,999

 

select

   to_char(begin_interval_time,'yyyy-mm-dd hh24:mi') snap_time,

   value

from

   dba_hist_sysstat

  natural join

   dba_hist_snapshot

where

   stat_name = '&stat_name'

and

  value > &stat_value

order by

   to_char(begin_interval_time,'yyyy-mm-dd hh24:mi')

;

 

Notice that this simple script will prompt you for the statistic name and threshold value; allowing ad-hoc AWR queries:

 

SQL> @rpt_sysatst

 

This will query the dba_hist_sysstat view to display all values

that exceed the value specified in

the "where" clause of the query.

 

Enter Statistic Name:  physical writes

Enter Statistics Threshold value:  200000

 

SNAP_TIME                  VALUE

------------------- ------------

2004-02-21 08:00         200,395

2004-02-27 08:00         342,231

2004-02-29 08:00         476,386

2004-03-01 08:00         277,282

2004-03-02 08:00         252,396

2004-03-04 09:00         203,407

 

The listing above indicates a repeating trend where physical writes seem to be high at 8:00 AM on certain days.  This powerful script will allow the DBA to quickly extract exception conditions from any instance-wide Oracle metric and see its behavior over time.

 

The next section provides a more powerful exception report that compares system-wide values to individual snapshots.

SEE CODE DEPOT FOR FULL SCRIPTS


This is an excerpt from my latest book "Oracle Tuning: The Definitive Reference". 

You can buy it direct from the publisher for 30%-off and get instant access to the code depot of Oracle tuning scripts:

http://www.rampant-books.com/book_2005_1_awr_proactive_tuning.htm

 


 

 

  
 

 Oracle cruise
 
 
 
Oracle performance tuning software
 
 

Oracle performance tuning book

 

 
 
 
Oracle performance Tuning 10g reference poster
 
 
 
Oracle training in Linux commands
 
Oracle training Excel
 
Oracle training & performance tuning books
 

 

Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  and include the URL for the page.
 
 


Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

 

Remote DBA Services


 

Copyright © 1996 -  2009 by Burleson Enterprises, Inc. All rights reserved.

Oracle © is the registered trademark of Oracle Corporation.