Prerequisite : You need to have access to Oracle DB with permission.

Find out Oracle AWR history: To know how many snapshot is stored in DB.
*snapshot is generally for one hour time period.
DBA_HIST_BASELINE is AWR view that displays baseline information. START_SNAP_TIME and END_SNAP_TIME is the maximum time period for which you can generate AWR.
SELECT*FROM DBA_HIST_BASELINE;
For example, we can generate AWR for anytime between START_SNAP_TIME [21-09-17 12:30 PM] to END_SNAP_TIME [29-09-17 11:30 AM] in this DB.

 

To generate AWR, you need 2 snap ID – start id and end id. To know which snapshot id is storing what information, you can query DBA_HIST_SNAPSHOT.
SELECT * FROM DBA_HIST_SNAPSHOT ORDER BY BEGIN_INTERVAL_TIME DESC;
Now if you want to generate report for 28-09-17, between 8:30 AM to 10:30 AM, then you need to use snapshot id 2964 and 2966.

 

To generate AWR,

  • Login to Database with privileged user
  • Run awrrpt.sql from $ORACLE_HOME/rdbms/admin/
  • For input format, type html
  • type in begin and end snap id
  • provide report name.

To generate ADDM,

  • Login to Database with privileged user
  • Run addmrpt.sql from $ORACLE_HOME/rdbms/admin/
  • type in begin and end snap id
  • provide report name.

Join The Discussion

Your email address will not be published. Required fields are marked *