-
-- Show CPU Usage for Active Sessions
--
SET PAUSE ON
SET PAUSE 'Press Return to Continue'
SET PAGESIZE 60
SET LINESIZE 300
COLUMN username FORMAT A30
COLUMN sid FORMAT 999,999,999
COLUMN serial# FORMAT 999,999,999
COLUMN "cpu usage (seconds)" FORMAT 999,999,999.0000
SELECT
s.username,
t.sid,
s.serial#,
SUM(VALUE/100) as "cpu usage (seconds)"
FROM
v$session s,
v$sesstat t,
v$statname n
WHERE
t.STATISTIC# = n.STATISTIC#
AND
NAME like '%CPU used by this session%'
AND
t.SID = s.SID
AND
s.status='ACTIVE'
AND
s.username is not null
GROUP BY username,t.sid,s.serial#
/
Monday, 14 August 2017
cpu usage per session
Subscribe to:
Post Comments (Atom)
Featured post
duplicate db from standy to other server
Duplicate Testuat $ export ORACLE_SID=Testuat3 $ sqlplus '/as sysdba' Testuat3 SQL> alter system set cluster_database=FALSE sc...
-
ORA-39346: data loss in character set conversion for object TABLE_STATISTICS:"GBO_DB"."DESPATCH_HEADER" As a workarou...
-
select client_name, status from dba_autotask_client; dba jb history select distinct client_name, window_name, job_status, job_info from...
-
First check the space on users tablespace select file_name,tablespace_name,bytes/1024/1024,autoextensible,maxbytes/1024/1024 from dba_d...
No comments:
Post a Comment