DOYENSYS Knowledge Portal




We Welcome you to visit our DOYENSYS KNOWLEDGE PORTAL : Doyensys Knowledge Portal




Monday, September 7, 2015

Find the CPU usage by session



Find the CPU usage by session




 select ss.username,  se.SID, VALUE/100 cpu_usage_seconds from  v$session ss,  v$sesstat se,  v$statname sn
 where se.STATISTIC# = sn.STATISTIC#
 and NAME like '%CPU used by this session%'
 and  se.SID = ss.SID
 and  ss.status='ACTIVE' and ss.username is not null
 order by VALUE desc;

No comments: