Copyright 2008, Oracle. All rights reserved. 3 - 2 Objectives After completing this lesson, you should be able to do the following: Create and manage AWR snapshots Generate AWR reports Create Compare Periods reports Copyright 2008, Oracle. All rights reserved. 3 - 3 Automatic Workload Repository: Overview SGA V$ DBA_* ADDM Self-tuning component Self-tuning component
Internal clients External clients EM SQL*Plus
Efficient in-memory statistics collection AWR snapshots MMON Copyright 2008, Oracle. All rights reserved. 3 - 4 Automatic Workload Repository Data Advisor results AWR SQL statistics Base statistics Metrics ASH Copyright 2008, Oracle. All rights reserved. 3 - 5 Workload Repository SYSAUX SGA In-memory statistics 6:00 a.m. 7:00 a.m. 8:00 a.m. Snapshot 1 Snapshot 2 Snapshot 3 Snapshot 4 9:00 a.m. 9:30 a.m. ADDM finds top problems. MMON Copyright 2008, Oracle. All rights reserved. 3 - 6 Database Control and AWR Edit snapshot parameters Run AWR report Manage snapshots Manage baselines Copyright 2008, Oracle. All rights reserved. 3 - 7 AWR Snapshot Purging Policy SYSAUX tablespace sys schema Snapshot Snapshot Snapshot Snapshot 8 days Snapshot MMON Every night 60 min Copyright 2008, Oracle. All rights reserved. 3 - 8 AWR Snapshot Settings DBMS_WORKLOAD_REPOSITORY.MODIFY_SNAPSHOT_SETTINGS ( retention IN NUMBER DEFAULT NULL, interval IN NUMBER DEFAULT NULL, topnsql IN NUMBER DEFAULT NULL); Copyright 2008, Oracle. All rights reserved. 3 - 9 Manual AWR Snapshots Create a snapshot DBMS_WORKLOAD_REPOSITORY.CREATE_SNAPSHOT (}; DBMS_WORKLOAD_REPOSITORY.DROP_SNAPSHOT_RANGE( LOW_SNAP_ID => 102, HIGH_SNAP_ID => 105); Drop one or more snapshots Create and delete snapshots using EM Copyright 2008, Oracle. All rights reserved. 3 - 10 Managing Snapshots with PL/SQL DBMS_WORKLOAD_REPOSITORY Package Procedure Name Description CREATE_SNAPSHOT Create a manual snapshot immediately DROP_SNAPSHOT_RANGE Drop a range of snapshots MODIFY_SNAPSHOT_SETTINGS Modify the snapshot settings Copyright 2008, Oracle. All rights reserved. 3 - 11 Generating AWR Reports in EM Copyright 2008, Oracle. All rights reserved. 3 - 12 Generating AWR Reports in SQL*Plus Copyright 2008, Oracle. All rights reserved. 3 - 13 Reading the AWR Report The first section provides Overview Most significant diagnostics Additional pages Detailed statistical information for specific areas Copyright 2008, Oracle. All rights reserved. 3 - 14 Snapshots and Periods Comparisons Copyright 2008, Oracle. All rights reserved. 3 - 15 Compare Periods: Benefits DBA
DBA
Copyright 2008, Oracle. All rights reserved. 3 - 16 Compare Periods: Results Copyright 2008, Oracle. All rights reserved. 3 - 17 Compare Periods: Report WORKLOAD REPOSITORY COMPARE PERIODS REPORT Copyright 2008, Oracle. All rights reserved. 3 - 18 Compare Periods: Load Profile Copyright 2008, Oracle. All rights reserved. 3 - 19 Compare Periods: Top Events Copyright 2008, Oracle. All rights reserved. 3 - 20 Summary In this lesson, you should have learned how to: Create and manage AWR snapshots Generate AWR reports Create Compare Periods reports Copyright 2008, Oracle. All rights reserved. 3 - 21 Practice 3 Overview: Using AWR-Based Tools This practice covers the following topics: Create and manage Automatic Workload Repository (AWR) snapshots Generate and view the sections of an AWR report Generate and view the sections of a Compare Periods report