Custom Search
www.rocket99.com : Technical Guides Sybase Oracle UNIX Javascript


Technical Guides
Sybase
Oracle
UNIX
Javascript




Of Interest

Business Intelligence and Analytics



Oracle Training





Oracle » Monitoring » Performance »

Displaying Running SQL Commands and Wait Times

     




Displaying SQL which is presently running on the Oracle server.




set pages 999 verify off
col sid format 999
col event format a40
col p1text format a20 newline
col p2text format a20 newline
col p3text format a20 newline
col p1 format 999999999999999
col p2 format 999999999999999
col p3 format 999999999999999
col p1raw format a16
col p2raw format a16
col p3raw format a16
col sql_text format a80
col last_call_et newline
col sql_text newline
select s.sid, event
,seq#
,P1TEXT
,P1
,P1RAW
,P2TEXT
,P2
,P2RAW
,P3TEXT
,P3
,P3RAW, s.last_call_et, wait_time,
seconds_in_wait, state, sql_text
from v$session s,v$session_wait w, v$sqlarea sa
where s.sql_address = sa.address
and s.sql_hash_value = sa.hash_value
and w.sid = s.sid
--and s.audsid != sys_context('USERENV','SESSIONID')
and s.audsid != userenv('SESSIONID')
and w.event != 'Null event'
and w.event != 'rdbms ipc message'
and w.event != 'pipe get'
and w.event != 'virtual circuit status'
and w.event not like '%timer%'
and w.event not like 'SQL*Net message %'
order by last_call_et
;










Oracle : Related Topics

Oracle : Monitoring : Determining Cache Hit Percentages

Sybase Web Site
Sybase iAnywhere Mobile Web Site
Oracle Enterprise Web Site



Get the latest Rocket99 news and tech tips via






Site Index About this Guide to Sybase, Oracle, and UNIX Contact Us Advertise on this site




Copyright © 2016 Stoltenbar Inc All Rights Reserved.