Hi,

Please try the following script in SQL*Plus:

select sql_text from v$sqltext
where address = (select sql_address from v$session where sid = &sid)
order by piece;

This will prompt you for the session_id for which you want to see the
current running statement.

Regards,
CJ

-----Original Message-----
Sent: Wednesday, October 16, 2002 1:40 AM
To: Multiple recipients of list ORACLE-L

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

*********************************************************
Disclaimer

This message (including any attachments) contains 
confidential information intended for a specific 
individual and purpose, and is protected by law. 
If you are not the intended recipient, you should 
delete this message and are hereby notified that 
any disclosure, copying, or distribution of this
message, or the taking of any action based on it, 
is strictly prohibited.

*********************************************************
Visit us at http://www.mahindrabt.com


-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Charu Joshi
  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