Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Last SQL commands

Re: Last SQL commands

From: <davide_at_yahoo.com>
Date: 17 May 2002 13:32:15 GMT
Message-ID: <ac30ov$mdtdg$5@ID-18487.news.dfncis.de>


"Michal Bene¹" <benes_at_sbt.cz> wrote:
> I need to know, how to find out which SQL command (whole with values of
> variables) have come to Oracle server as last.

You can look in the V_$sessioni and v_$sqltext views that holds a snapshot of the SGA. Try using

select

        to_char(logon_time,'DD-MM-YYYY HH:mm'),
        machine,
        status,
        sql_text
from
        sys.v_$sqltext_with_newlines, sys.v_$session
where
        SQL_ADDRESS=ADDRESS and
        SQL_HASH_VALUE=HASH_VALUE
order by 
	sid desc, piece;

Davide Received on Fri May 17 2002 - 08:32:15 CDT

Original text of this message

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