How to generate an ASH report from Oracle Database?
ASH reports give a quick glance of how the database has performed between two snapshots. It mainly highlights the following areas:
To generate ASH report, DBA needs to perform the following:
1) Login to DB Server as oracle
2) export ORACLE_SID=PrimeDG
3) cd $ORACLE_HOME/rdbms/admin
4) sqlplus / as sysdba
6) Enter value for report_type: html
Note: Since, we want to open the file in nicely formatted way, we pick html format.
7) Enter value for begin_time: <enter>
Note: Default is last 15 minutes. If you need to change to non-default value, feel fre to change the value. You can change the value as below.
If the requirement is from past 30 minutes then enter: -30
if the requirement is from past 1 ½ hours then enter: -1:30
if the requirement is from past 1 day, then enter: -24:00
8) Enter value for duration: 5
Note: I used 5 minutes as the end time from the begin time specified in Step-6.. Feel free to change the value as per your need.
9) Enter value for report_name: Sample_ASH_testing.html
10.Ash report is Generated
To pull the report, download a tool call WinSCP.
10) Start WinSCP and configure it connect to server with “oracle” username.
11) Copy the file form UNIX (right side) to Windows (left side).
12) Double click the file to open the report in browser
For your Reference:
How to check the snapshot IDs:
To check for a specific snapshot ID
How to check the retention time (how long snapshots will stay in sysaux tablespace before they get purged)?