Join v$rollname, v$rollstat, v$session c, v$sqltext and v$transaction : sqltext « System Tables Data Dictionary « Oracle PL/SQL Tutorial






SQL>
SQL> SELECT a.name, b.xacts tr, c.sid, c.serial#, c.username, d.sql_text
  2  FROM   v$rollname a, v$rollstat b, v$session c,
  3         v$sqltext d,v$transaction e
  4  WHERE  a.usn            = b.usn
  5  AND    b.usn            = e.xidusn
  6  AND    c.taddr          = e.addr
  7  AND    c.sql_address    = d.address
  8  AND    c.sql_hash_value = d.hash_value
  9  and    rownum < 2
 10  ORDER BY a.name, c.sid, d.piece;

no rows selected

SQL>








30.66.sqltext
30.66.1.Join v$session, v$lock and v$sqltext
30.66.2.Join v$session, v$lock and v$sqltext with subquery
30.66.3.Join v$rollname, v$rollstat, v$session c, v$sqltext and v$transaction