Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

oracle get running queries

SELECT s.SID,
       s.USERNAME,
       sql.OPTIMIZER_MODE,
       sql.CPU_TIME,
       sql.ELAPSED_TIME,
       sql.SQL_TEXT,
       s.SERIAL#
FROM V$SQLAREA sql,
     V$SESSION s
WHERE s.SQL_HASH_VALUE = sql.HASH_VALUE
  AND s.SQL_ADDRESS = sql.ADDRESS
  AND s.USERNAME IS NOT NULL;
 
PREVIOUS NEXT
Tagged: #oracle #running #queries
ADD COMMENT
Topic
Name
5+4 =