You are on page 1of 38

AWR Warehouse

An Introduction
whoami
Developer turned Oracle DBA

Based in Hong Kong

Co-Founder of HKOUG (Hong Kong Oracle User Group)

Occasional Blogger (mostly bugs I hit) at jolliffe.hk

Twitter @jolliffe

https://www.linkedin.com/in/jolliffe
Contents
The Automatic Workload Repository

The Case for AWR Warehouse

Configuring and Using AWR Warehouse

A Couple of Recommendations

ETL Process Flow


The Automatic Workload
Repository (AWR)
The Automatic Workload Repository (AWR)
A built-in repository in every (Enterprise
Edition) Oracle database

Regular snapshots of vital statistics

Data stored in SYSAUX tablespace

Enabled by default

Part of the Diagnostic and Tuning Option ($$$)

Either Query data yourself

Also tightly integrated with Enterpise Manager


Active Session History (ASH)
Every second the state every non-idle session
is recorded (in memory), and exposed as

V$ACTIVE_SESSION_HISTORY

One in ten moved to persistent storage:

DBA_HIST_ACTIVE_SESSION_HISTORY

Useful for troubleshooting performance


issues after they happen
The Case for AWR Warehouse
If AWR is full of
useful
information….

...then why do we
keep throwing it
away?
Reasons for Purging AWR
▪ It’s the default (for a reason)

▪ Database/SYSAUX Growth leads to

▪ Longer Backups

▪ Longer Upgrades

▪ Querying affects production


performance ($$$)
Enter AWR Warehouse
▪ Offload AWR History to a separate
instance

▪ Schedule backups and upgrades


separately

▪ Leverage Enterprise Manager for


▪ Target Discovery

▪ Reporting
Additive Free
▪(Almost) no new tables

▪ Uses current tables (WRH$ exposed


as DBA_HIST_)

▪Partitioned by dbid, snap_id

▪Except
▪ Caw_dbid_mapping
▪ ETL process flow
No Hidden Charges
A ... single instance Oracle Database
can be ... used as an infrastructure
repository for ... Automatic Workload
Repository (AWR) Warehouse ...
without additional license
requirements, provided that all the
targets are correctly licensed. It may
not be used or deployed for other uses.

http://docs.oracle.com/cd/E80920_01/DBLIC/Licensing-Information.htm
Configuring AWR Warehouse
Using AWR Warehouse
A Couple of Recommendations
Keep It Separate
▪ A Dedicated Instance

▪ On a Dedicated Host

▪ Not OEM Repository


Welcome to the Future
▪ Use 12cR2 for the Repository
database

▪ Low risk exposure to

▪ New features

▪ New bugs
ETL Process Flow
ETL Process Flow - General Points
▪ Use the Source
▪ Separate schedules

▪All objects owned by dbsnmp

▪ Some simplifications

▪ Table Names (CAW_ prefix)

▪ Error Handling
Overview
Enterprise
A Manager

AWR
Extract R

B
R A B
AWR
CAWR
AWR
Extract Transfer Load

AWR
Extract 11
10
4
3
2
1
9
8
7
6
5
Extract
C
AWR
run_extract 1
01-24

day
2
49-66
49-63
49-60 25-48
3
48-72

extract_metadata
snaps transferred
01 24 N
25 48 N
49 72 N 12
11
10
4
3
2
1
9
8
7
6
5
Transfer
Enterprise
Manager R

C
load_metadata
em_id target db_id snaps imported
extract_metadata 1 A 101 01 24 N
snaps transferred 1 B 102 01 24 N
01 24 Y
N 1_xxx_103_01_24.dmp 1 C 103 01 24 N
25 48 Y
N 1_xxx_103_25_48.dmp
ZIP ZIP 1 C 103 25 48 N
49 72 Y
N 1_xxx_103_49_72.dmp 1 C 103 49 72 N

4
3
2
1
6
5
8
7
9
R
Load SELECT
property_value
run_master FROM
dbid CAWR
042 101 102 103
dbid_mapping
run_worker dbsnmp.caw_properties
1 target dbid

day
AWRLOAD$201
AWRLOAD$202
AWRLOAD$203 WHERE
2
3
R 042

property_name = AB 101
102
'max_parallel_loads'; C 103
load_metadata
target dbid snaps imported
A 101
PROPERTY_VALUE
49 72 N
N
Y
Y
load_workers
B 102 49 72
C 103 2
01 24 N
Y
target staging_dir

C 103 25 48 N
Y A
C AWRLOAD$201
AWRLOAD$203
C 103 49 72 N
Y B AWRLOAD$202
21
20
19
18
17
16
15
14
13
12
11
10
25
24
23
22
9
8
7
6
5
4
3
2
1
In Summary
AWR Warehouse saves
you $$$

Install it, use it

Understand how it works


Further Reading
https://docs.oracle.com/database/122/TDPPT/using-automatic-workload-repository-warehouse.htm

http://dbakevlar.com/category/awr-warehouse/

https://jolliffe.hk/category/enterprise-manager/awr-warehouse/
Any
Thank You! Questions?

You might also like