Find username consuming high CPU in Oracle

Script to find the Username which causing bottleneck of CPU in Oracle


select * from (
SELECT  se.username, ROUND (value/100) "CPU Usage"
FROM v$session se, v$sesstat ss, v$statname st
WHERE ss.statistic# = st.statistic#
   AND name LIKE  '%CPU used by this session%'
   AND se.sid = ss.SID and ROUND (value/100) <> 0
   AND se.username IS NOT NULL
  ORDER BY value DESC) where rownum <= 10;
This entry was posted in Oracle on by .
Unknown's avatar

About SandeepSingh

Hi, I am working in IT industry with having more than 15 year of experience, worked as an Oracle DBA with a Company and handling different databases like Oracle, SQL Server , DB2 etc Worked as a Development and Database Administrator.

Leave a Reply