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: How do I find out the SQL statements for a session

Re: How do I find out the SQL statements for a session

From: Stephane Faroult <sfaroult_at_oriole.com>
Date: Wed, 02 Jul 2003 13:34:30 -0700
Message-ID: <F001.005C1EB3.20030702132557@fatcity.com>


Roger Xu wrote:
>
> Hi,
>
> >From V$SESSION, I can find out all the sessions for a user.
> How do I find out the current SQL and previous SQL for that session?
>
> Thanks,
>
> Roger Xu
> Database Administrator
> Dr Pepper Bottling Company of Texas
> (972)721-8337
>

SQL statements are identified by an address (location of the cursor in SGA) and a hash value (to make sure that the address has not been reused by another cursor). 999 first characters can be found in V$SQL or V$SQLAREA. For longer statements nose around V$SQLTEXT or V$SQLTEXT_WITH_NEWLINES.
 I still have to see the 'previous SQL' coordinates point to something else than the 'current SQL'.

-- 
Regards,

Stephane Faroult
Oriole Software
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Stephane Faroult
  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).
Received on Wed Jul 02 2003 - 15:34:30 CDT

Original text of this message

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