Iotzov OEM Repository
Iotzov OEM Repository
[email protected]
News America Marketing
(NewsCorp)
Sources of Information in OEM
AWR/ASH
SYSAUX
DB1
SYSAUX
DB2
SYSAUX
DB3
OEM
Repository
OEM
DB
Process of Metrics Gathering in OEM
Databases Databases Databases
OS OS ASM OS
MGMT$METRIC_CURRENT
OEM Server MGMT$METRIC_DETAILS
MGMT$METRIC_HOURLY OEM
MGMT$METRIC_DAILY Repository
Some Metrics-related OEM Repository Tables
Aggregate Aggregate
Raw
Reference
Raw
Data
Useful Applications – averages over any period of time
Find the average run queue length during business hours(M-F, 7 am – 8 pm)
for 30 days
Useful Applications – averages over any period of time
Find the average run queue length during business hours(M-F, 7 am – 8 pm)
for 30 days
Query: select
avg(average)
from
mgmt$metric_hourly
where
rollup_timestamp > sysdate – 30
and target_name = 'dbtest01'
and metric_name = 'Load'
and column_labal = 'Run Queue Length (1 minute average)'
and to_char(rollup_timestamp,'DAY') not in ('SATURDAY','SUNDAY')
and rollup_timestamp between trunc(rollup_timestamp,'DD') + 7/24
and trunc(rollup_timestamp,'DD') + 20/24
Output: 2.97053285256410256410256410256410256411
Create UDM in each production database. The sole purpose of this UDM would be to supply
data to the OEM repository
Useful Applications – enforcing enterprise-wide policies
Check: select
corr(streams_latency.value , IO_load.value)
from
( select *
from
mgmt$metric_details
where
target_name = 'STRDEST'
and metric_name = 'streams_latency_throughput'
and column_label = 'Latency' ) streams_latency ,
(select *
from
mgmt$metric_details
where
target_name = ‘STRDEST'
and metric_name = 'instance_throughput'
and column_label = 'I/O Megabytes (per second)') IO_load
where
streams_latency.collection_timestamp between IO_load.collection_timestamp
and IO_load.collection_timestamp + 5/(60*24)
and streams_latency.collection_timestamp > sysdate – 1
Output: -0.001043436634863007975354458994748444098631
Output: 0.7641297491294021289799243642319279128629
Interpretation: The redo volume on the Capture side is likely the reason for increased latency on the Apply side
Advanced Forecasting Example - tablespace size forecast
30000
25000
Size (MB)
20000
Historical
15000 Min Range
Max Range
10000 Forecast
5000
0
-56 -54 -47 -40 -33 -26 -19 -18 -11 -4 3 10 17 24 31 38 45 52 59 66 73 80 87
Time (days)
Advanced Forecasting Example - tablespace size forecast
Getting raw historical tablespace sizing data from the OEM repository
Import data and create functions that are not available in Oracle
create or replace
FUNCTION f_forecast_t_dist (p_degree_freedom NUMBER , p_conf NUMBER) RETURN NUMBER IS
l_res NUMBER;
l_one_tail_conf NUMBER;
BEGIN
--- Custom Code
END f_forecast_t_dist;
Advanced Forecasting Example - tablespace size forecast
Final computations
l_ci:=sqrt ( 1/ l_cnt
+
power((p_period_forecast - l_avgx),2)
/
l_sxx
);
l_sigma:= sqrt(
abs(
(l_syy
-
(power(l_sxy,2)/l_sxx)
)
)
/(l_cnt-2)
) ;
p_out_estimate_95_range:=(l_ci
*
f_forecast_t_dist(l_cnt-2,0.95)
*
l_sigma) ;
Advanced Forecasting Example - tablespace size forecast
Sample Output:
References
OEM 11g appears to have the same OEM repository structures as OEM 10g