Skip to main content

Posts

Showing posts from February, 2012

DBA_HIST_SYSMETRIC_SUMMARY

To generate oracle workload metrics report, use the following query to generate date sqlplus> col metric_name format a39 select metric_name,substr(to_char(begin_interval_time,'hh24:mi'),1,4)||'0' snapshot, sum(case to_char(begin_interval_time,'yyyymmdd') when '20120208' then round(average) end) as date20120208, sum(case to_char(begin_interval_time,'yyyymmdd') when '20120209' then round(average) end) as date20120209, sum(case to_char(begin_interval_time,'yyyymmdd') when '20120210' then round(average) end) as date20120210 from DBA_HIST_SYSMETRIC_SUMMARY,dba_hist_snapshot where dba_hist_snapshot.snap_id=DBA_HIST_SYSMETRIC_SUMMARY.snap_id and metric_name in ('Physical Reads Per Sec','Physical Writes Per Sec','Redo Generated Per Sec','Logical Reads Per Sec','Host CPU Utilization (%)','Current Logons Count','Executions Per Sec') and to_char(begin_interval_time,'yyyym