blog menu1

ActiveSessionHistory

Last 5 mins ASH data -
SELECT NVL(a.event, 'ON CPU') AS event, COUNT(*) AS total_wait_time FROM v$active_session_history a WHERE a.sample_time > SYSDATE - 5/(24*60) ---- 5 mins
GROUP BY a.event ORDER BY total_wait_time DESC;

Last One days ASH data
SELECT NVL(a.event, 'ON CPU') AS event, COUNT(*)*10 AS total_wait_time FROM dba_hist_active_sess_history a WHERE a.sample_time > (SYSDATE - 1 ) GROUP BY a.event ORDER BY total_wait_time DESC;


$ORACLE_HOME/rdbms/admin/awrrpt.sql; 
$ORACLE_HOME/rdbms/admin/ashrpt.sql; 
$ORACLE_HOME/rdbms/admin/awrsqlrpt.sql; 
Less Known AWR Reports: 
awrinfo.sql - General AWR Info 
awrddrpt.sql Comparison report between snapshots 
awrblmig.sql Migrates pre-11g baseline data into 11g Baseline tables. 
awrgrpt.sql RAC Aware AWR Report.

No comments:

Post a Comment