On 9i and 10g, You
can use smenu for that : install it and launch a sampler : spl
-start
It
will sample v$session every second but in order to let me analyse the query
offline or days after, It start to dump all sql v$sql figures and text from
v$sql_newline into
ascii files. Then every 60s (or what ever interval) new hash_value that are not yet dumped are
appended to the dump file.
Be carefull for it can generates quite big files, depending on the activity of the DB.
If it helps you, all the best,
B. Polarski
http://www.smenu.org
Dear Oracle Gurus:
Is there a way to get at
all the SQL statements that have ever been run against the database in the last
couple of days? I am only interested in 'select' statements. I looked at the
SGA(v$sql) and a lot of what I am interested in has already been flushed out.
Are there any Oracle forensics experts that can sleuth out this information? I
know this is a long shot, but any help is much appreciated.
Thanks,
Sunil.