4 Copyright ? 2006, Oracle. All rights reserved. Metrics, Alerts, and Baselines 4-2 Copyright ? 2006, Oracle. All rights reserved. Objectives pleting this lesson, you should be able to do the following: ? View metrics by using the metrics history views ? Create metric thresholds ? View alerts ? Create metric baselines ? Enable adaptive thresholds 4-3 Copyright ? 2006, Oracle. All rights reserved. Metrics, Alerts, and Baselines Metric: Rate of change in a cumulative statistic Alert: Event generated when a monitored metric crosses a threshold Baseline: Data gathered from a “ normal running database ” for parison 4-4 Copyright ? 2006, Oracle. All rights reserved. Limitation of Base Statistics 30 minutes 30 minutes V$SYSSTAT Physical reads I/O I/O Time Time Low rate High rate Statistics just keep growing. 2M 2M 4-5 Copyright ? 2006, Oracle. All rights reserved. Typical Delta Tools ? Comparison of statistics at two points in time is needed. ? The following tools produce deltas: – Statspack – AWR reports – Customized scripts 4-6 Copyright ? 2006, Oracle. All rights reserved. Oracle Database 10 g Solution: Metrics Base statistic 1 Redo generation Metric 1 Metric 2 Redo generation/ Tx Client 1 Client 2 Client 3 Client 4 V$AME V$SYSMETRIC V$SESSMETRIC V$FILEMETRIC V$EVENTMETRIC MMON mit User rollback V$WAITCLASSMETRIC V$SERVICEMETRIC 4-7 Copyright ? 2006, Oracle. All rights reserved. Benefits of Metrics DBA Analyze differences. Query a metric. Without metrics With metrics 4-8 Copyright ? 2006, Oracle. All rights reserved. Viewing Metric History Information ? In memory: –V$SYSMETRIC_HISTORY –V$FILEMETRIC_HISTORY –V$WAITCLASSMETRIC_HISTORY –V$SERVICEMETRIC_HISTORY –V$SESSION_WAIT_HISTORY (last 10 events) ? On disk: –DBA_HIST_SYSMETRIC_SUMMARY –DBA_HIST_SYSMETRIC_HISTORY (alerts only) –DBA_HIST_SESSMETRIC_HISTORY –DBA_HIST_SYSTEM_EVENT (cumulative) –DBA_HIST_FILEMETRIC_HISTORY (alerts only) –DBA_HIST_FILESTATXS (cumulative) –DBA_HIST_WAITCLAS