Show selects for session

Shows also total CPU usage and disk reads.


select a.USERNAME,
c.sql_text,
a.SID,
(select j.what
from dba_jobs_running jr, dba_jobs j
where jr.SID = a.sid
and jr.job = j.job) as job,
a.process,
a.program,
a.module,
a.machine,
c.FIRST_LOAD_TIME,
c.CPU_TIME,
c.ELAPSED_TIME, c.DISK_READS,
sysdate as aktual_time
from v$sql c, v$session a
where a.sql_address = c.address
and a.sql_hash_value = c.hash_value
and a.sid = ...here_session_id...

Leave a Reply

Your email address will not be published. Required fields are marked *