大多数信息都可以在v $session中找到…并且可以从v $sql或v $sqltext_with_newlines中获取sql Text …
原文链接:https://www.f2er.com/oracle/205311.html-- In Flight sql SELECT nvl(ses.username,'ORACLE PROC')||' ('||ses.sid||')' USERNAME,SID,MACHINE,REPLACE(sql.sql_TEXT,CHR(10),'') STMT,ltrim(to_char(floor(SES.LAST_CALL_ET/3600),'09')) || ':' || ltrim(to_char(floor(mod(SES.LAST_CALL_ET,3600)/60),'09')) || ':' || ltrim(to_char(mod(SES.LAST_CALL_ET,60),'09')) RUNT FROM V$SESSION SES,V$sqltext_with_newlines sql where SES.STATUS = 'ACTIVE' and SES.USERNAME is not null and SES.sql_ADDRESS = sql.ADDRESS and SES.sql_HASH_VALUE = sql.HASH_VALUE and Ses.AUDSID <> userenv('SESSIONID') order by runt desc,1,sql.piece;