-
8/2/2019 Auto Workload Repository-Imtiyaz Presentation
1/15
Imtiyaz Shaikh
-
8/2/2019 Auto Workload Repository-Imtiyaz Presentation
2/15
Until Oracle 9i, DBAs spent a lot of time on databasemonitoring, identifying problem areas and performancebottlenecks
DBA tasks focused on System Resources
Storage management
Space Management
Application and SQL tuning
Fixing Security Issues
-
8/2/2019 Auto Workload Repository-Imtiyaz Presentation
3/15
AWR, a built-in repository in every database is thecentral component of Oracle Database 10gmanageability infrastructure.
Provides services to the database to access, collect,
process, and maintain performance statistics on variousfunctionalities within the database.
At regular intervals (60 minutes), Oracle Database 10gtakes snapshots of all vital statistics and workload data
Stores them in the repository for a period of seven days.
-
8/2/2019 Auto Workload Repository-Imtiyaz Presentation
4/15
The repository is a source of information forseveral other Oracle 10g features including:
Automatic Database Diagnostic Monitor
SQL Tuning AdvisorUndo Advisor
Segment Advisor
-
8/2/2019 Auto Workload Repository-Imtiyaz Presentation
5/15
Repository data used for analysis and as statistics for
problem detection and self-tuning.
Used for system level and user level analysis.
AWR is the basis for all self-management functionalitiesof the database.
Gives the Oracle Database with the historicalperspective on its usage.
AWR has report generation mechanism to producesummary reports based on database statistics.
Very similar to STATSPACK in previous database
versions, but a lot convenient to use
-
8/2/2019 Auto Workload Repository-Imtiyaz Presentation
6/15
AWR in Oracle Database 10g collects-
Time model statistics
Object statistics
Session and system statistics in v$sesstat andv$sysstat
Optimizer statistics
-
8/2/2019 Auto Workload Repository-Imtiyaz Presentation
7/15
Active Session History (ASH) contains recent sessionactivity.
Memory for ASH comes from the SGA, fixed for theinstance lifetime.
ASH samples the v$sessionview every second andrecords the events the active sessions are waiting for.
ASH statistics can be viewed fromv$active_session_history, one row for each active
session per sample with the latest session rows first. Contents of v$active_session_history flushed to disk
as part of the AWR snapshot process.
-
8/2/2019 Auto Workload Repository-Imtiyaz Presentation
8/15
AWR stored in Workload Repository (WR) schema. AWR schema resides in the SYSAUX tablespace. A snapshot is a set of performance statistics captured
at a certain time in the database. Used for computing the rate of change of a statistic. Identified by unique snapshot sequence # (snap_id). Generated every 60 minutes by default. INTERVAL parameter to change snapshot frequency.
Manual snapshots can be taken using the
DBMS_WORKLOAD_REPOSITORY.CREATE_SNAPSHOT procedure or through Enterprise Manager.
-
8/2/2019 Auto Workload Repository-Imtiyaz Presentation
9/15
Metrics are a set of statistics for certain systemattributes.
Calculated and stored by the Automatic WorkloadRepository (AWR).
Results displayed in Enterprise Manager through theAll Metricspage under Related Linkson theDatabase Homepage.
Thresholds are the boundary values against
which the metric values are compared.
-
8/2/2019 Auto Workload Repository-Imtiyaz Presentation
10/15
-
8/2/2019 Auto Workload Repository-Imtiyaz Presentation
11/15
AWR reports are generated using awrrpt.sql, awrrpti.sql,awrddrpt.sql, and awrddrpi.sqlin$ORACLE_HOME/rdbms/admindirectory.
Reports as html pages or text reports. awrrpt.sql - all available AWR snapshots.
awrrpti.sql - statistics for a range of snapshot ids on aspecified database and instance awrddrpt.sql - statistics of a particular SQL statement
for a range of snapshot ids. awrddrpi.sql - statistics of a SQL statement for a range
of snapshot ids on a specified database and instance.
-
8/2/2019 Auto Workload Repository-Imtiyaz Presentation
12/15
-
8/2/2019 Auto Workload Repository-Imtiyaz Presentation
13/15
-
8/2/2019 Auto Workload Repository-Imtiyaz Presentation
14/15
-
8/2/2019 Auto Workload Repository-Imtiyaz Presentation
15/15
Thank You