1. ASH (Active sessionhistory)
Ash is based on v$session, sampling once per second, recording events waiting for an active session. Inactive sessions are not sampled, and sampling work is done by the newly introduced background process MMNL.
The V$active_session_history view provides information on extracting session activity at the instance level. The active session is sampled once per minute and stored in a circular buffer in the SGA. Any session that is connected to the database and is waiting for a conversation that is not part of an idle wait event is considered an active session. Each session sample is a set of row data and returns the row data for each sampled active session through the V$active_session_history view, returning the first row of data for the most recent sampled session. Because the active session sampling is stored in a loop buffer in the SGA, the larger the system activity, the less active time can be stored in the loop buffer. This means that each session that is sampled during this period appears in the v$ view or the time of the session activity is displayed in the v$ view, which is entirely dependent on the database activity.
The minimum value of ASH buffers is 1MB and the maximum value is not more than 30MB. Record data in memory. Expectation is the recording of an hour of content, so ash memory record data is always limited
General online real-time diagnosis database performance problems, especially load high w out on the 100, CPU 100%, this time with ash real-time log report, can be very much accurate location of the problem.
2. Ash key
After executing the sql> @?/rdbms/admin/ashrpt.sql command, the following parameters need to be filled in manually:
(1) Log report type
Enter value for Report_type:text
--Select the generated Ash report type, text or HTML
(2) Log report start time
Enter value for begin_time:08/31/1620:00:00
--Enter Ash start time, the time format above example has the explanation, for example I here is August 31, 2016 evening 20:00:00 starts.
(3) Log report end time
Enter value for duration:7200
--Enter Ash end time, default is Sysdate-begin_time, general input analysis statistics of the total time, the general default is the second, such as here 7200 is 2 hours, take out 2 hours of ash analysis log.
Oracle generates ASH reports