Think Foward Logo Tested on Oracle 7 Tested on Oracle 8.0

SQL Script

TOP CPU Users

Updated: 08-Jan-2001
Version: 1.0

Description

Script displays details so the session which have used the most CPU. Needs the Init.Ora parameter timed_statistics set to true to work.

Parameters

None

SQL Source

REM Copyright (C) Think Forward.com 1998- 2005. All rights reserved. 
col program form a30 heading "Program" col CPUMins form 99990 heading "CPU Mins" spool topcpu.lst SELECT v.sid, program, v.value / (100 * 60) CPUMins FROM v$statname s , v$sesstat v, v$session sess WHERE s.name = 'CPU used by this session' and sess.sid = v.sid and v.statistic#=s.statistic# and v.value>0 ORDER BY v.value DESC ; spool off

Return to Index of SQL Scripts


Site Map

General Information : Home | Company Profile | Contact Us | Legal
Database Support : Proactive Support | Pay Per Incident Support
Expert Services : High Availability | Creative Solutions | Training
Build Services : Oracle Installations | Revive your Oracle Setup | Low Cost Development
Free Oracle Resources: DBA Scripts | Oracle Links