21
3 Copyright © 2008, Oracle. All rights reserved. Using Automatic Workload Repository

less_03_oracle_performance_tuning:11g

Embed Size (px)

DESCRIPTION

oracle performance tuning:11g

Citation preview

Page 1: less_03_oracle_performance_tuning:11g

3Copyright © 2008, Oracle. All rights reserved.

Using Automatic Workload Repository

Page 2: less_03_oracle_performance_tuning:11g

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

Page 3: less_03_oracle_performance_tuning:11g

Copyright © 2008, Oracle. All rights reserved.3 - 3

Automatic Workload Repository: Overview

SGA

V$ DBA_*

ADDM Self-tuningcomponent

Self-tuningcomponent

…Internal clients

External clients EM SQL*Plus …

Efficientin-memorystatisticscollection

AWRsnapshotsMMON

Page 4: less_03_oracle_performance_tuning:11g

Copyright © 2008, Oracle. All rights reserved.3 - 4

Automatic Workload Repository Data

Advisorresults

AWR

SQLstatistics

Basestatistics

Metrics ASH

Page 5: less_03_oracle_performance_tuning:11g

Copyright © 2008, Oracle. All rights reserved.3 - 5

Workload Repository

SYSAUXSGA

In-memorystatistics

6:00 a.m.7:00 a.m.8:00 a.m.

Snapshot 1Snapshot 2Snapshot 3Snapshot 49:00 a.m.

9:30 a.m.

ADDM finds top problems.MMON

Page 6: less_03_oracle_performance_tuning:11g

Copyright © 2008, Oracle. All rights reserved.3 - 6

Database Control and AWR

Edit snapshot parameters

Run AWR report

Manage snapshots

Manage baselines

Page 7: less_03_oracle_performance_tuning:11g

Copyright © 2008, Oracle. All rights reserved.3 - 7

AWR Snapshot Purging Policy

SYSAUX tablespace

sys schema

SnapshotSnapshotSnapshotSnapshot

8days

Snapshot

MMON

Every night

60 min

Page 8: less_03_oracle_performance_tuning:11g

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);

Page 9: less_03_oracle_performance_tuning:11g

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

Page 10: less_03_oracle_performance_tuning:11g

Copyright © 2008, Oracle. All rights reserved.3 - 10

Managing Snapshots with PL/SQL

DBMS_WORKLOAD_REPOSITORY Package

Procedure Name DescriptionCREATE_SNAPSHOT Create a manual snapshot immediately

DROP_SNAPSHOT_RANGE Drop a range of snapshots

MODIFY_SNAPSHOT_SETTINGS Modify the snapshot settings

Page 11: less_03_oracle_performance_tuning:11g

Copyright © 2008, Oracle. All rights reserved.3 - 11

Generating AWR Reports in EM

Page 12: less_03_oracle_performance_tuning:11g

Copyright © 2008, Oracle. All rights reserved.3 - 12

Generating AWR Reports in SQL*Plus

Page 13: less_03_oracle_performance_tuning:11g

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

Page 14: less_03_oracle_performance_tuning:11g

Copyright © 2008, Oracle. All rights reserved.3 - 14

Snapshots and Periods Comparisons

Page 15: less_03_oracle_performance_tuning:11g

Copyright © 2008, Oracle. All rights reserved.3 - 15

Compare Periods: Benefits

DBA

DBA

Page 16: less_03_oracle_performance_tuning:11g

Copyright © 2008, Oracle. All rights reserved.3 - 16

Compare Periods: Results

Page 17: less_03_oracle_performance_tuning:11g

Copyright © 2008, Oracle. All rights reserved.3 - 17

Compare Periods: Report

WORKLOAD REPOSITORY COMPARE PERIODS REPORT

Page 18: less_03_oracle_performance_tuning:11g

Copyright © 2008, Oracle. All rights reserved.3 - 18

Compare Periods: Load Profile

Page 19: less_03_oracle_performance_tuning:11g

Copyright © 2008, Oracle. All rights reserved.3 - 19

Compare Periods: Top Events

Page 20: less_03_oracle_performance_tuning:11g

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

Page 21: less_03_oracle_performance_tuning:11g

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