oracle show running queries code example
Example: oracle show running queries
SELECT s.SID,
s.USERNAME,
OPTIMIZER_MODE,
HASH_VALUE,
ADDRESS,
CPU_TIME,
ELAPSED_TIME,
SQL_TEXT,
SERIAL#
FROM V$SQLAREA SQLAREA,
V$SESSION s
WHERE s.SQL_HASH_VALUE = SQLAREA.HASH_VALUE
AND s.SQL_ADDRESS = SQLAREA.ADDRESS
AND s.USERNAME IS NOT NULL;