Database Tuning (MOSC)

MOSC Banner

History of top sessions!

edited Dec 9, 2016 4:00AM in Database Tuning (MOSC) 2 commentsAnswered

Hi,

I am looking for the history of top sessions as it may give which session consuming more CPU or  I/O at particular time!..     Is there a way I will get that information beside Oracle Enterprise Manager. With the below script,  I will get current top sessions with high CPU, but I need session history with high CPU.

Your early response is very much appreciated.

===

SELECT
  
s.username,
  
t.sid,
  
s.serial#,
  
SUM(VALUE/100) as "cpu usage (seconds)"
FROM
  
v$session s,
  
v$sesstat t,
  
v$statname n
WHERE
  
t.STATISTIC# = n.STATISTIC#
AND
  
NAME like '%CPU used by this session%

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center