This script finds expensive CPU usage on Oracle server


SELECT substr(a.sid,1,5) "Sid",
substr(a.process,1,7) "Process",
substr(a.username,1,20) "User",
v.value "CPU used by this session"
FROM v$statname s, v$sesstat v, v$session a
WHERE s.name = 'CPU used by this session'
and v.statistic#=s.statistic#
AND v.sid = a.sid
and v.value > 1000
ORDER BY v.value DESC;
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: