select sql_text from v$sqltext t1, v$session t2 where t2.sid = &sid
and t1.address = t2.sql_address order by t1.piece
/

--- Chuan Zhang <[EMAIL PROTECTED]> wrote:
> Dear ALL,
> 
>      Is there any way to see the currently running SQL in one
> session? I used v$open_cursor, but there might be many SQL
> statements,  I don't know which one is currently running. And more,
> if I execute a stored procedure, which SQL statements could be seen
> in v$open_cursor? 
> 
> Any clues would be much appreciated.
> 
> TIA
> 
> Chuan
> > Unless otherwise stated, this e-mail does not represent the views
of 
> TransACT Communications Pty Limited.  This text and any attachments
> of 
> this e-mail are confidential and may be legally privileged.  This
> email 
> is for the use of the intended recipient only. If you are not the
> intended 
> recipient do not take any action in relation to this email, other
> than to 
> notify TransACT Communications by replying to this e-mail and
> destroying 
> the original communication.  Except as required by law, TransACT 
> Communications does not represent that this transmission is free of
> errors, 
> viruses or interference.
> 
> 
> 


__________________________________________________
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Paul Baumgartel
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to