Awr, Addm - Ash
Awr, Addm - Ash
Automatic Workload Repository gathers, processes and maintains performance stats used for
problem detection and self-tuning the databases. This collective information can be displayed as
views and reports (HTML/text) to better show the current database performance status for
further analysis.
AWR gathers the following data
Object Statistics (access / usage stats of DB segments)
Time Model Statistics (V$SYS_TIME_MODEL and V$SESS_TIME_MODEL views)
Some of the System and Session Statistics (V$SYSSTAT and V$SESSTAT views)
ASH (Active Session History) Statistics
High load generating SQL Statements
By default, Snapshots are generated every hour and retains the statistics in the repository for 8
days. Please find below if you intend to change the default settings:
BEGIN
DBMS_WORKLOAD_REPOSITORY.MODIFY_SNAPSHOT_SETTINGS( retention => 14400,
interval => 30, topnsql => 100, dbid => 12345678);
END;
/
Here ,
Retention = 14400 minutes (10 days) Snapshot retention period
Interval = 30 minutes Snapshot interval period
topnsql = Number of Top SQL to flush
dbid = database identifier
Automatic Database Diagnostic Monitoring Report analyzes the AWR data on a regular basis, to
give you overview of the root cause of the problem which is affecting your database’s
performance. It also provides suggestions or recommendations for rectifying any problem
identified and lists the areas which are having no issues. ADDM recommends multiple solutions
for the DBA to choose from which includes,
Database Configuration
Hardware changes
Schema changes
Application changes &
Other advisories
ADDM refines the report based on the key factor DB time (cumulative time spent by database to
process user requests). Below mentioned is the script to generate ADDM:
@$ORACLE_HOME/rdbms/admin/addmrpt.sql
Below mentioned is the script which you can run to generate your ASH report,
@$ORACLE_HOME/rdbms/admin/ashrpt.sql
@$ORACLE_HOME/rdbms/admin/ashrpti.sql