Worked on the scripts in this zip today: https://www.bobbydurrettdba.com/uploads/sessionprofiledbahist.zip
I wanted to see a session profile from the DBA_HIST_ACTIVE_SESS_HISTORY view. My idea was to include the time the session was inactive as well as the time it was waiting on an event or using the CPU.
On both these scripts you have to manually update the date range.
ashsessionlist.sql – this just gives you a list of the sessions for a given date range. Sorts them from most to least active. Also shows the total timeframe so you can tell how much inactive time there was compared with active.
ashsessionprofile.sql – takes a given instance, SID, and sequence number and produces a nice session profile. The key to any session profile is to include some comparison of the waits and cpu with the overall elapsed time.
– Bobby