And if you are on 9i and want the full text, you can query v$sql, which contains the full sql text in pieces: select sql_text from v$sqltext t1, v$session t2 where t2.sid = &sid and t1.address = t2.sql_address order by t1.piece Paul Baumgartel CREDIT SUISSE Information Technology DBA & Admin - NY, KIGA 1 11 Madison Avenue New York, NY 10010 USA Phone 212.538.1143 paul.baumgartel@xxxxxxxxxxxxxxxxx www.credit-suisse.com -----Original Message----- From: oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx]On Behalf Of Christian Antognini Sent: Tuesday, April 25, 2006 12:48 PM To: Joseph Amalraj Cc: oracle-l@xxxxxxxxxxxxx Subject: RE: identify CTAS from v$ tables Joseph >I need to know the sql being run by the session. This is another question ;-) Then use the following query: select sql_text from v$sql where command_type = 1 Be careful that SQL_TEXT is a VARCHAR2(1000). If the statement is longer you should use SQL_FULLTEXT which is a LOB (10g only). HTH Chris -- //www.freelists.org/webpage/oracle-l ============================================================================== Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html ============================================================================== -- //www.freelists.org/webpage/oracle-l