Query v$sql for sql text
SQL>
SQL> alter session set cursor_sharing=force;
Session altered.
SQL> select substr( username, 1, 1 )
2 from all_users au2
3 where rownum = 1;
SUBSTR(USERNAME,1,1)
------------------------------
S
1 row selected.
SQL>
SQL> select sql_text from v$sql
2 where sql_text like 'select /* TAG */ %';
no rows selected
SQL>
SQL>
Related examples in the same category