oracle show running queries

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

showing results for - "oracle show running queries"
Matilda
09 Oct 2016
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;
Paco
10 May 2019
1SELECT s.SID,
2       s.USERNAME,
3       OPTIMIZER_MODE,
4       HASH_VALUE,
5       ADDRESS,
6       CPU_TIME,
7       ELAPSED_TIME,
8       SQL_TEXT,
9       SERIAL#
10FROM V$SQLAREA SQLAREA,
11     V$SESSION s
12WHERE s.SQL_HASH_VALUE = SQLAREA.HASH_VALUE
13  AND s.SQL_ADDRESS = SQLAREA.ADDRESS
14  AND s.USERNAME IS NOT NULL;