I have some troubles when I try to retrieve last executed queries in a database.
I run the script below:
select distinct t.first_load_time, t.sql_text, t.last_load_time, s.username
from v_$sql t, v$session s
And as a result, I retrieve the queries executed by SYS user. But the problem is that, if SYS user executed the same query more than once,
only the very first record is shown.
It is like this,
SYS user executes "select * from table_abc" at 10:54:35, and after that SYS executes the same query at 13:45:55. and after running
the query above, I can only see the record which was executed at 10:54:35. I need to see the both results.
Can anyone tell me what I should do or change in the query above?