Table of Contents

Oracle Database - VSQL_MONITOR

About

apps/search/search.jsp displays SQL statements whose execution have been (or are being) monitored by Oracle ( > 5 sec)

Status

SQL execution status:

Normally, you have this status lifecycle: * QUEUED - SQL statement is queued

Sql

select 
  sql_exec_id, -- execution id
  sql_plan_hash_value, -- hash plan id
  mon.process_name, -- process name (if px_maddop = 2, two times the same process names
  mon.status, 
  mon.sid, -- Id
  mon.px_qcsid, -- Parent Id
  round((LAST_REFRESH_TIME - FIRST_REFRESH_TIME)*24*60) as elapsed_min, -- elapsed time
  FIRST_REFRESH_TIME,
  LAST_REFRESH_TIME,
  px_maxdop,
  px_servers_requested, -- total number of threads ? per process
  mon.sql_text, -- sql_text
  mon.* 
from v$SQL_MONITOR mon where sql_id = 'fj7xst7nvxjn3' -- sql_text is also possible
order by 
mon.sql_exec_id,
mon.sql_plan_hash_value,
mon.process_name;