User Tools

Site Tools


oracle:awr

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
oracle:awr [2015/01/26 12:06]
dodger [Number of SQL's captured on each snapshot]
oracle:awr [2020/03/20 11:16] (current)
dodger [List AWR snapshots]
Line 1: Line 1:
 +====== [DOC] AWR ======
  
-====== AWR ======+====== Configuration ======
 ===== Actual config ===== ===== Actual config =====
  
 <code sql> <code sql>
-select * +select * from dba_hist_wr_control ;
-from +
-   dba_hist_wr_control +
-/+
 </code> </code>
 or, only timings: or, only timings:
Line 27: Line 25:
 Modify, units are minutes: Modify, units are minutes:
 <code sql> <code sql>
-EXECUTE DBMS_WORKLOAD_REPOSITORY.MODIFY_SNAPSHOT_SETTINGS(+BEGIN 
 +DBMS_WORKLOAD_REPOSITORY.MODIFY_SNAPSHOT_SETTINGS(
   retention =>  20160);   retention =>  20160);
 +END;
 +/
 </code> </code>
  
Line 34: Line 35:
 Modify, units are minutes: Modify, units are minutes:
 <code sql> <code sql>
-EXECUTE DBMS_WORKLOAD_REPOSITORY.MODIFY_SNAPSHOT_SETTINGS(+BEGIN 
 +DBMS_WORKLOAD_REPOSITORY.MODIFY_SNAPSHOT_SETTINGS(
   interval  =>  60);   interval  =>  60);
 +END;
 +/
 </code> </code>
  
Line 42: Line 46:
 Modify, units are minutes: Modify, units are minutes:
 <code sql> <code sql>
-EXECUTE DBMS_WORKLOAD_REPOSITORY.MODIFY_SNAPSHOT_SETTINGS(+BEGIN 
 +DBMS_WORKLOAD_REPOSITORY.MODIFY_SNAPSHOT_SETTINGS(
   topnsql  =>  100);   topnsql  =>  100);
 +END;
 +/
 </code> </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.1422273993.txt.gz · Last modified: 2015/01/26 12:06 by dodger