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: SQL Text

RE: SQL Text

From: Reardon, Bruce (CALBBAY) <Bruce.Reardon_at_comalco.riotinto.com.au>
Date: Tue, 13 Feb 2001 16:19:41 -0800
Message-ID: <F001.002B338F.20010213154543@fatcity.com>

Hi Sanjay,

Try the following:

select username, q.*

    from

       v$session s , v$sql q
    where

              q.address = s . sql_address
       and q.hash_value = s.SQL_HASH_VALUE
       and s.username = 'user'

    ;

select a.address,

           a.buffer_gets, 
           a.executions, 
           b.piece, 
           b.sql_text 

from v$sqlarea a, v$sqltext b , v$session s
where a.ADDRESS = b.ADDRESS 
and   a.HASH_VALUE = b.HASH_VALUE 
and   a.hash_value = s.sql_hash_value
and   s.sid=&sidd

order by 1,4;

select a.address,

           a.buffer_gets, 
           a.executions, 
           buffer_gets/executions, 
           b.piece, 
           b.sql_text 

from v$sqlarea a, v$sqltext b
where executions > 0
and a.ADDRESS = b.ADDRESS
and a.HASH_VALUE = b.HASH_VALUE
order by 1,5;

Regards,
Bruce

-----Original Message-----
Sent: Wednesday, 14 February 2001 10:31
hi,
I want to see the latest SQL Statements that I sent to Database. I know that I can make use of V$sqlarea but it restricts only to first 1000 characters. But my query is more than that.
Any help.
Sanjay
--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Reardon, Bruce (CALBBAY)
  INET: Bruce.Reardon_at_comalco.riotinto.com.au

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 Tue Feb 13 2001 - 18:19:41 CST

Original text of this message

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