Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: identify CTAS from v$ tables

RE: identify CTAS from v$ tables

From: Joseph Amalraj <joseph_at_amalrajinc.com>
Date: Tue, 25 Apr 2006 09:56:44 -0700 (PDT)
Message-ID: <20060425165644.50338.qmail@web405.biz.mail.mud.yahoo.com>


Hi,    

  The query does not return any output. DB version is 9.2.0.7    

  SQL> select sid from v$session where command = 1   2 /

         SID


        28
  SQL> select sql_text from v$sql where command_type = 1;   no rows selected
  SQL>   Regards    

  Joseph

Christian Antognini <Christian.Antognini_at_trivadis.com> wrote:   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

--
http://www.freelists.org/webpage/oracle-l
Received on Tue Apr 25 2006 - 11:56:44 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US