Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

query to check cpu utilization in oracle database

SELECT ss.USERNAME, se.SID, se.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;
Source by www.dba-oracle.com #
 
PREVIOUS NEXT
Tagged: #query #check #cpu #utilization #oracle #database
ADD COMMENT
Topic
Name
4+9 =