Join v$open_cursor and v$sqltext : open_cursor « System Tables Data Dictionary « Oracle PL/SQL Tutorial






SQL>
SQL> SELECT oc.user_name, s.sql_text
  2  FROM   v$open_cursor oc, v$sqltext s
  3  WHERE  oc.address    = s.address
  4  and    rownum < 2
  5  AND    oc.hash_value = s.hash_value
  6  ORDER BY oc.user_name, s.piece;

USER_NAME
------------------------------
SQL_TEXT
----------------------------------------------------------------
SYS
= :1 and status = 'ACTIVE'


SQL>








30.53.open_cursor
30.53.1.Join v$open_cursor and v$sqltext