User Tools

Site Tools


oracle:awr

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
oracle:awr [2015/01/22 17:14]
dodger created
oracle:awr [2020/03/20 11:16] (current)
dodger [List AWR snapshots]
Line 1: Line 1:
 +====== [DOC] AWR ======
  
-====== AWR ====== +====== Configuration ====== 
-===== retention ===== +===== Actual config ===== 
-==== query ==== + 
-<code>+<code sql> 
 +select * from dba_hist_wr_control ; 
 +</code> 
 +or, only timings: 
 +<code sql>
 select select
        extract( day from snap_interval) *24*60+        extract( day from snap_interval) *24*60+
Line 14: Line 19:
 / /
 </code> </code>
 +
 +===== retention =====
 +
 ==== modify ==== ==== modify ====
 +Modify, units are minutes:
 +<code sql>
 +BEGIN
 +DBMS_WORKLOAD_REPOSITORY.MODIFY_SNAPSHOT_SETTINGS(
 +  retention =>  20160);
 +END;
 +/
 +</code>
 +
 +===== frequency =====
 +Modify, units are minutes:
 +<code sql>
 +BEGIN
 +DBMS_WORKLOAD_REPOSITORY.MODIFY_SNAPSHOT_SETTINGS(
 +  interval  =>  60);
 +END;
 +/
 +</code>
 +
 +
 +===== Number of SQL's captured on each snapshot =====
 +Modify, units are minutes:
 +<code sql>
 +BEGIN
 +DBMS_WORKLOAD_REPOSITORY.MODIFY_SNAPSHOT_SETTINGS(
 +  topnsql  =>  100);
 +END;
 +/
 +</code>
 +
 +====== Basic queries ======
 +
 +===== List AWR snapshots =====
 +<code sql>
 +select 
 +  DBID, 
 +  snap_id, 
 +  snap_level, 
 +  to_char(begin_interval_time, 'dd/mm/yy hh24:mi:ss') begin
 +from
 +   dba_hist_snapshot
 +order by 1;
 +</code>
 +
 +===== View SQL_TEXT of selected SQL_ID =====
 +<code sql>
 +select SQL_TEXT from WRH$_SQLTEXT where SQL_ID='<SQL_ID>';
 +</code>
  
  
  
  
oracle/awr.1421946897.txt.gz · Last modified: 2015/01/22 17:14 by dodger