Carlos Sierra's Tools and Tips

Tools and Tips for Oracle Performance and SQL Tuning

Meet: eAdam – Enkitec’s free AWR data mining tool

with 9 comments

You recently learned about eDB360, and now eAdam? What is this eAdam tool? Before you continue reading, please be aware that eAdam reads data from AWR, thus you must have a license for the Oracle Diagnostics Pack in order to use this new eAdam tool.

Introduction

New eAdam is a free tool to perform data mining on performance related historical data recorded by AWR. The main characteristics of eAdam are:

  • Installs nothing on the Source database (usually Production)
  • Extracts AWR performance related data as plain text flat files (no export or data pump binary files)
  • Upload extracted AWR data into a Staging database of same or different platform and release
  • Data mining is performed on the Staging database instead of Production

How does eAdam work?

It is better to explain eAdam by functions. So I would say eAdam has the following 4 modules:

  1. AWR extraction from Source (Production)
  2. eAdam installation on Staging system
  3. Loading into eAdam Stage a set of AWR  files extracted from Source
  4. AWR data mining on eAdam Stage

AWR extraction from Source (Production)

This is the simplest part. You just need to execute a simple and short script on a Source system (usually Production). This script extracts into flat files the content of the following AWR views. Then it compresses them into a TAR file. List below may expand over time as new eAdam versions become available.

DBA_HIST_ACTIVE_SESS_HISTORY
DBA_HIST_DATABASE_INSTANCE
DBA_HIST_DATAFILE
DBA_HIST_DLM_MISC
DBA_HIST_EVENT_HISTOGRAM
DBA_HIST_FILESTATXS
DBA_HIST_IOSTAT_DETAIL
DBA_HIST_IOSTAT_FILETYPE
DBA_HIST_IOSTAT_FUNCTION
DBA_HIST_OSSTAT
DBA_HIST_PGASTAT
DBA_HIST_SERVICE_STAT
DBA_HIST_SGA
DBA_HIST_SGASTAT
DBA_HIST_SNAPSHOT
DBA_HIST_SQL_PLAN
DBA_HIST_SQLSTAT
DBA_HIST_SQLTEXT
DBA_HIST_SYS_TIME_MODEL
DBA_HIST_SYSSTAT
DBA_HIST_SYSTEM_EVENT
DBA_HIST_TEMPFILE
DBA_HIST_TEMPSTATXS

eAdam installation on Staging system

You install eAdam once and then use it multiple times. If you download a newer version just install it on top of the prior one, so you get the eAdam delta. eAdam should be installed on a Staging database and not in Production or UAT. Pretty much any database could be your Staging database (QA or any other lower environment). It could even be a database on your laptop for example. Your Staging database does not have to be the same platform or database release than Source.

To install eAdam you simply execute another script. It creates a schema (you provide the name and password), and this script creates the eAdam repository on your Staging database.

Loading into eAdam Stage a set of AWR  files extracted from Source

You can load into eAdam as many TAR files as you want. Each set is identified within eAdam with a sequence key. So your eAdam repository can contain AWR data from different systems, and they could be from same or different platforms and database releases. The data model of your eAdam repository is determined from your Staging database release, so it is ideal your Staging database is of equal or higher release than your Sources, but this is not mandatory.

To load a TAR file with AWR data into your Staging eAdam repository, you execute another script that asks for the TAR name and it produces a set of External Tables, then uploads the AWR data from the temporary external Tables into permanent staging Tables:

DBA_HIST_ACTIVE_SESS_HIST_S
DBA_HIST_DATABASE_INSTANC_S
DBA_HIST_DATAFILE_S
DBA_HIST_DLM_MISC_S
DBA_HIST_EVENT_HISTOGRAM_S
DBA_HIST_FILESTATXS_S
DBA_HIST_IOSTAT_DETAIL_S
DBA_HIST_IOSTAT_FILETYPE_S
DBA_HIST_IOSTAT_FUNCTION_S
DBA_HIST_OSSTAT_S
DBA_HIST_PGASTAT_S
DBA_HIST_SERVICE_STAT_S
DBA_HIST_SGASTAT_S
DBA_HIST_SGA_S
DBA_HIST_SNAPSHOT_S
DBA_HIST_SQLSTAT_S
DBA_HIST_SQLTEXT_S
DBA_HIST_SQL_PLAN_S
DBA_HIST_SYSSTAT_S
DBA_HIST_SYSTEM_EVENT_S
DBA_HIST_SYS_TIME_MODEL_S
DBA_HIST_TEMPFILE_S
DBA_HIST_TEMPSTATXS_S
DBA_HIST_XTR_CONTROL_S
DBA_TAB_COLUMNS_S

AWR Data mining on eAdam Stage

Once your AWR is available inside eAdam, you can perform all the Data Mining you may need. A sample script that produces several CSV files out of your data is provided. This sample script is automatically executed at the end of your upload, so you get a set of CSV files that can be used on Excel or any other tool that reads CSV files. I use Excel, where I can easily generate Charts out of the CSV files created by the sample script. That means I can easily visualize trends out of performance data without having access to the Source (Production) environment.

To produce the sample CSV files, eAdam provides a set of views on top of its own repository. These set of views will evolve over time as new releases become available. As of 1st release we provide the following views:

SH_AAS_APPLICATION_V1
ASH_AAS_CLUSTER_V1
ASH_AAS_COMMIT_V1
ASH_AAS_CONCURRENCY_V1
ASH_AAS_ON_CPU_V1
ASH_AAS_OTHER_V1
ASH_AAS_SCHEDULER_V1
ASH_AAS_TOTAL_V1
ASH_AAS_USER_IO_V1
ASH_INST_V1
ASH_RAC_V1
EVENT_HISTOGRAM_INST_V1
EVENT_HISTOGRAM_IO_RAC_V1
EVENT_HISTOGRAM_RAC_V1
EVENT_HISTOGRAM_RAC_V2
OSSTAT_BUSY_TIME_PERC_V1
OSSTAT_DELTA_V1
OSSTAT_INST_V1
OSSTAT_LOAD_V1
OSSTAT_RAC_V1
SYSTEM_EVENT_DELTA_V1
SYSTEM_EVENT_INST_V1
SYSTEM_EVENT_NON_IDLE_V1
SYSTEM_EVENT_RAC_V1
SYS_TIME_MODEL_DB_CPU_V3
SYS_TIME_MODEL_DB_TIME_V3
SYS_TIME_MODEL_DB_WAIT_V3
SYS_TIME_MODEL_DELTA_V1
SYS_TIME_MODEL_INST_V1
SYS_TIME_MODEL_RAC_V1

FAQ

Q1: Where can I download eAdam?

A1: From the Enkitec web page. Click on the “Products” tab. The tool will be available on March 7, 2014.

Q2: Is it really free?

A2: Yes. And before you ask what is the catch: “there is no catch”. Just be aware you must have an Oracle Diagnostics Pack license in order to access AWR data, and this eAdam tool is not an exception. Besides that, eAdam is free to download and use.

Q3: I need some extra functionality. How do I get it?

A3: If you need something that eAdam does not provide out of the box, of course you can extend its functionality directly. If the addition is something of general interest, you can submit an “Enhancement Request” (an email actually or a comment on this post). But it you want something more advanced and of particular use, you can contact Enkitec for a quote for this customization on top of eAdam (for example an Apex application).

Q4: Can I share this eAdam tool or its output?

A4: Sure you can. Just credit Enkitec for the tool. In other words, use it any way you want, but please honor authorship and ownership.

Q5: Who “owns” eAdam?

A5: Enkitec owns this new tool. Carlos Sierra is the author of eAdam, but the vision and some critical components were provided by: Frits Hoogland, Karl Arao and Randy Johnson. So eAdam is the product of a collaboration effort of some geeks working for Enkitec.

Conclusion

Enkitec is providing this eAdam tool for AWR Data Mining for free. Having an Oracle Diagnostics Pack is a must before using this tool. Besides that, feel free to use this tool at will, and perform all your AWR Data Mining outside the Source system, which is very important for a Production environment. This eAdam is very resource conscious on the Source system, and it empowers anyone to do performance analysis without having direct access to the Source database.

Having an AWR repository created with eAdam, enables many possibilities, like having baselines for particular processes, or compare performance between different time intervals (pre and post an application upgrade for example) or between two different systems (UAT and Production for example). If you already have a set of scripts to do data mining on DBA_HIST views, you can easily convert them to use the matching eAdam Staging tables so you would no longer be constrained to connect to the live system.

Performing Data Mining in entities like ASH as stored by AWR is like digging in a gold mine. There is so much the database wants to tell you. You just need this kind of of tool to listen carefully and find what is important.

Written by Carlos Sierra

March 5, 2014 at 7:29 am

Posted in Active Session History, ASH, AWR, eAdam, edb360, Scripts

Tagged with

9 Responses

Subscribe to comments with RSS.

  1. Hi, Carlos,
    Great work! Is eAdam the same tool as your ATK tool?

    Thanks,

    Weidong

    Weidong Zhou

    March 5, 2014 at 12:02 pm

  2. Hi Carlos,
    Thanks for your generous offering. We happen to use Confio Ignite and are able to connect to our production system, but customs reports seems difficult and limited. I find that the tool is biased toward “Top” waits and frequently the waits we are concerned with don’t show up in their “Top” lists. Do you know much of Ignite and can you briefly compare them? Also can talk about mining for important waits that don’t appear as “Top” waits on your system?

    Thanks,

    Richard Brieck

    Richard Brieck

    March 5, 2014 at 12:33 pm

    • Richard,
      I am not familiar with Confio Ignite.
      eAdam gives you the full content of the AWR views listed, so you get not only the top waits but all the waits.
      To make use of eAdam you simply write queries on top of the views and staging tables provided. You use the sample script and create your own.

      Carlos Sierra

      March 6, 2014 at 6:11 am

  3. Hello Carlos,

    The tool seems awesome, I was doing the same thing by extracting an AWR dump on the production database with the following Oracle script before re-import into local DB for analysis :
    @?/rdbms/admin/awrextr

    This way it is way more convenient, I’ll dig in this method.

    Thanks again for sharing this tool and edb360 !
    Christophe

    Jean-Christophe DAUCHY

    March 13, 2014 at 6:17 am

    • Hope you like it. I am already working on next release, which includes these also: v_$datafile, v_$tempfile, v_$controlfile, gv_$log, gv_$active_session_history, gv_$system_parameter2, gv_$sql, gv_$sql_monitor, gv_$sql_plan_monitor, gv_$sql_plan_statistics_all.

      Carlos Sierra

      March 13, 2014 at 7:46 am

  4. I was testing using under windows using cygwin (i know windos is bad 🙂 ).. I had to had the following part in eadam_06_cet.sql file to convert the DOS CR/LF, otherwise I was getting
    ORA-01722 during the loading of number column which happened to be at the last column.

    Might help some other windows users..

    /* ————————– DOS to UNIX conversion ————————- */

    HOS perl -pi -e ‘s/\r\n/\n/g’ dba_hist_xtr_control.txt
    HOS perl -pi -e ‘s/\r\n/\n/g’ dba_tab_columns.txt
    HOS perl -pi -e ‘s/\r\n/\n/g’ dba_hist_snapshot.txt
    HOS perl -pi -e ‘s/\r\n/\n/g’ dba_hist_osstat.txt
    HOS perl -pi -e ‘s/\r\n/\n/g’ dba_hist_sys_time_model.txt
    HOS perl -pi -e ‘s/\r\n/\n/g’ dba_hist_pgastat.txt
    HOS perl -pi -e ‘s/\r\n/\n/g’ dba_hist_sysstat.txt
    HOS perl -pi -e ‘s/\r\n/\n/g’ dba_hist_system_event.txt
    HOS perl -pi -e ‘s/\r\n/\n/g’ dba_hist_sqlstat.txt
    HOS perl -pi -e ‘s/\r\n/\n/g’ dba_hist_service_stat.txt
    HOS perl -pi -e ‘s/\r\n/\n/g’ dba_hist_sga.txt
    HOS perl -pi -e ‘s/\r\n/\n/g’ audit_actions.txt
    HOS perl -pi -e ‘s/\r\n/\n/g’ dba_hist_event_histogram.txt
    HOS perl -pi -e ‘s/\r\n/\n/g’ dba_hist_database_instance.txt
    HOS perl -pi -e ‘s/\r\n/\n/g’ dba_hist_datafile.txt
    HOS perl -pi -e ‘s/\r\n/\n/g’ dba_hist_tempfile.txt
    HOS perl -pi -e ‘s/\r\n/\n/g’ dba_hist_iostat_detail.txt
    HOS perl -pi -e ‘s/\r\n/\n/g’ dba_hist_iostat_filetype.txt
    HOS perl -pi -e ‘s/\r\n/\n/g’ dba_hist_iostat_function.txt
    HOS perl -pi -e ‘s/\r\n/\n/g’ dba_hist_sgastat.txt
    HOS perl -pi -e ‘s/\r\n/\n/g’ dba_hist_filestatxs.txt
    HOS perl -pi -e ‘s/\r\n/\n/g’ dba_hist_tempstatxs.txt
    HOS perl -pi -e ‘s/\r\n/\n/g’ dba_hist_dlm_misc.txt
    HOS perl -pi -e ‘s/\r\n/\n/g’ dba_hist_active_sess_history.txt
    HOS perl -pi -e ‘s/\r\n/\n/g’ dba_hist_sqltext.txt
    HOS perl -pi -e ‘s/\r\n/\n/g’ dba_hist_sql_plan.txt

    Jean-Christophe DAUCHY

    March 13, 2014 at 11:40 am


Leave a reply to Weidong Zhou Cancel reply