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: session sql statements

RE: session sql statements

From: Mark Leith <mark_at_cool-tools.co.uk>
Date: Mon, 06 Aug 2001 08:19:04 -0700
Message-ID: <F001.0036177F.20010806081524@fatcity.com>

Hi

Here is something to give you a start :

select s.sid,
       s.username,
       t.sql_text
   from v$session s,
          v$sqltext t

 where s.sid = THE_SID_U_R_INTERESTED_IN

    and s.sql_hash_value = t.hash_value;

There is a lot more info you can glean out of this - the key is to join either V$SESSION & V$SQLTEXT or V$SQLAREA, or in fact all of the above with something like the HASH_VALUE/SQL_HASH_VALUE columns.

Have a dig..

HTH Mark

-----Original Message-----
maganti
Sent: Monday, August 06, 2001 03:11
To: Multiple recipients of list ORACLE-L

Hi

how can i see the sql statements that are related to a particular session .

i think it can be seen from v$sqlarea.

anybody of you have the statement ?

reg/
prsad



Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: prasad maganti
  INET: prasadm_g_at_yahoo.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (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). -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Mark Leith INET: mark_at_cool-tools.co.uk Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (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 Mon Aug 06 2001 - 10:19:04 CDT

Original text of this message

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