Tag: v$sqlarea

How to find SQL running for a user/sid?

Using the SQL below in which joining with V$session and V$sqlarea one can find the SQL currently running. In this example using a session id one can find the SQL running SQL> select a.sid, a.serial#, b.sql_text from v$session a, v$sqlarea b where a.sql_address=b.address and a.sid = 257; SID SERIAL# ---------- ---------- SQL_TEXT -------------------------------------------------------------------------------- 257 8885 … Continue reading How to find SQL running for a user/sid?