Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Get Apex User from v$session, v$process

Richard LeggeJul 2 2020 — edited Jul 3 2020

Hi All,

Apex 5.1 SE 12.1

Im trying to identify which APEX user is consuming most OS CPU at a given time, and what SQL they are executing

I can determine the SQL being executed by a given Linux OS process with the following SQL, and this obviously results in listing APEX_PUBLIC_USER and the SQL being executed,  but I cannot find any information on how to determine which specific APEX user it was at that given time, executing the SQL.

SELECT

S.OSUSER,

P.SPID PID,

S.USERNAME DBUSER,

S.SID,S.SERIAL#,

S.STATUS,

S.LAST_CALL_ET ACTIVE_TIME_SEC,

S.SQL_ID,

SQL.SQL_FULLTEXT

FROM V$SESSION S,

V$PROCESS P,

V$SQL SQL

WHERE 

S.PADDR=P.ADDR

AND S.SQL_ID=SQL.SQL_ID

AND S.SQL_CHILD_NUMBER=SQL.CHILD_NUMBER

AND P.SPID=:PID

If anyone could advise, Id be grateful..

Kind Regards

Richard

This post has been answered by fac586 on Jul 2 2020
Jump to Answer
Comments
Post Details
Added on Jul 2 2020
2 comments
874 views