oracle get running queries

Solutions on MaxInterview for oracle get running queries by the best coders in the world

showing results for - "oracle get running queries"
Mateo
28 Jun 2020
1SELECT s.SID,
2       s.USERNAME,
3       sql.OPTIMIZER_MODE,
4       sql.CPU_TIME,
5       sql.ELAPSED_TIME,
6       sql.SQL_TEXT,
7       s.SERIAL#
8FROM V$SQLAREA sql,
9     V$SESSION s
10WHERE s.SQL_HASH_VALUE = sql.HASH_VALUE
11  AND s.SQL_ADDRESS = sql.ADDRESS
12  AND s.USERNAME IS NOT NULL;