Sunteți pe pagina 1din 15

Imtiyaz Shaikh

Until Oracle 9i, DBAs spent a lot of time on database monitoring, identifying problem areas and performance bottlenecks DBA tasks focused on System Resources Storage management Space Management Application and SQL tuning Fixing Security Issues

AWR, a built-in repository in every database is the central component of Oracle Database 10g manageability infrastructure. Provides services to the database to access, collect, process, and maintain performance statistics on various functionalities within the database. At regular intervals (60 minutes), Oracle Database 10g takes snapshots of all vital statistics and workload data Stores them in the repository for a period of seven days.

The repository is a source of information for several other Oracle 10g features including:
Automatic Database Diagnostic Monitor SQL Tuning Advisor Undo Advisor Segment Advisor

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 functionalities of the database. Gives the Oracle Database with the historical perspective on its usage.

AWR has report generation mechanism to produce summary reports based on database statistics.
Very similar to STATSPACK in previous database versions, but a lot convenient to use

AWR in Oracle Database 10g collects Time model statistics Object statistics Session and system statistics in v$sesstat and v$sysstat Optimizer statistics

Active Session History (ASH) contains recent session activity. Memory for ASH comes from the SGA, fixed for the instance lifetime. ASH samples the v$session view every second and records the events the active sessions are waiting for. ASH statistics can be viewed from v$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.

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_SNAPSHO T procedure or through Enterprise Manager.

Metrics are a set of statistics for certain system attributes. Calculated and stored by the Automatic Workload Repository (AWR). Results displayed in Enterprise Manager through the All Metrics page under Related Links on the Database Home page.

Thresholds are the boundary values against which the metric values are compared.

Oracle Database 10g metrics can be tracked using AWR. Two categories of Usage metrics- Database feature usage and High water mark (HWM) value of certain database attributes. MMON tracks and records the database feature usage and HWM statistics on a weekly basis. Statistics are recorded in AWR snapshots. To review statistics, dba_feature_usage_statistics view and dba_high_water_mark_statistics view or Enterprise Manager.

AWR reports are generated using awrrpt.sql, awrrpti.sql, awrddrpt.sql, and awrddrpi.sql in $ORACLE_HOME/rdbms/admin directory. Reports as html pages or text reports. awrrpt.sql - all available AWR snapshots. awrrpti.sql - statistics for a range of snapshot ids on a specified 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.

Thank You

S-ar putea să vă placă și