SQL text history [message #681032] |
Mon, 08 June 2020 15:01 |
wtolentino
Messages: 421 Registered: March 2005
|
Senior Member |
|
|
if the query or sql no longer exists from these v$ data dictionary views v$sqlarea, v$sqltext, and v$sql. are there any other history views where I can find the query or sql based on the sql_id that we know?
thank you.
|
|
|
|
|
Re: SQL text history [message #681037 is a reply to message #681034] |
Tue, 09 June 2020 00:06 |
|
Michel Cadot
Messages: 68729 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
In V$ until they are aged out from the SGA, so it depends on its size and the instance activity.
In the DBA_HIST until:
select retention from DBA_HIST_WR_CONTROL;
But DBA_HIST does not contain all SQLs only those that have been captured during snapshots and seldom used query may not be there.
|
|
|