In addition, AWR is highly integrated with OEM, making it easy to analyze and fix a
performance problem.
Chapter 8: Database Tuning 271
Like STATSPACK, AWR collects and maintains performance statistics for problem detection
and self-tuning purposes. You can generate reports on the AWR data, and you can access it via
views and through OEM. You can report on recent session activity as well as the overall system
statistics and SQL usage.
AWR captures the system statistics on an hourly basis (taking ???snapshots??? of the database) and
stores the data in its repository tables. As with STATSPACK, the space requirements of the AWR
repository will increase as the historical retention period is increased or the interval between
snapshots is decreased. By default, seven days worth of data is maintained in the repository. You
can see the snapshots that are stored in the AWR repository via the DBA_HIST_SNAPSHOT view.
To enable AWR, set the STATISTICS_LEVEL initialization parameter to TYPICAL or ALL. If you
set STATISTICS_LEVEL to BASIC, you can take manual snapshots of AWR data, but they will not
be as comprehensive as those performed automatically by AWR. Setting STATISTICS_LEVEL to ALL
adds timed OS statistics and plan execution statistics to those gathered with the TYPICAL setting.
Managing Snapshots
To take a manual snapshot, use the CREATE_SNAPSHOT procedure of the DBMS_WORKLOAD_
REPOSITORY package:
execute DBMS_WORKLOAD_REPOSITORY.
Pages:
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463