Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: SQL run against the database
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.
you will find more help at http://www.smenu.org/smenu_owi.htm 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
-----Original Message-----
From: Sunil Kanderi [mailto:sunil.kanderi_at_gmail.com]
Sent: Thursday, 22 June, 2006 11:56 PM
To: oracle-l_at_freelists.org
Subject: SQL run against the database
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.
-- http://www.freelists.org/webpage/oracle-lReceived on Fri Jun 23 2006 - 01:35:38 CDT