Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

SQL History

767881Mar 2 2011 — edited Mar 2 2011
Dear friends,

How can we see the historical sql statement in Oracle 11g. I am looking a way to get some sql statements which ran 2-3 days before.
I searched into v$session, v$sql, v$sqlarea views but it does not have the statements I am looking for.

Then I searched into v$sqltext, v$sqltext_with_newlines, v$sql_monitor and dba_hist_sqltext tables but it has only last 24 hours statements.

Requesting experts to kindly clear my doutbs:

1. Need solution on the above issue.

2. what is the time period when oracle flushed out data from v$session, v$sqlarea, v$sql, v$sqltext and v$sql_monitor?

3. What is the sequence of flushing out the data i.e first from which table it has been flushed out to which table and finally - which is the last table data has been keet out and how long?

4. Is there any parameter which can be changed and the historical data retain period can be increased/decreased?

5. Any new views/tables which has been provided specially in Oracle 11g on the above subject.

Looking forward to get your assistance.

Regards.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 30 2011
Added on Mar 2 2011
1 comment
2,284 views