Question: How can I see the last SQL statement
executed? I need to see recent SQL stataments.
Answer: This
script will display the most recent SQL statements:
select
sesion.sid,
sql_text
from
v$sqltext sqltext,
v$session sesion
where
sesion.sql_hash_value =
sqltext.hash_value
and
sesion.sql_address =
sqltext.address
and
sesion.username is not
null
order by
sqltext.piece;