Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Last SQL commands
"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
![]() |
![]() |