Re: How to get sql text after run
Date: Sun, 11 Jul 2021 00:22:23 +0100
Message-ID: <CAM7tOHN6RyipFfGsVEDZ4zQEXMh8jLQwWW4fdLPXjSJ-t9ugHw_at_mail.gmail.com>
Hi Eriovaldo,
As I know, dba_hist_active_sess_history doesn't contain sql text. So it sould be joined with dba_hist_sqltext to get the full sql text.
I also used to look for full sql text in v$sqlstats especially for DDL statements since there is a bug in 11.2.0.4 and this type of statements are truncated in v$sqlarea and v$sql..
V$SQL.SQL_TEXT and Dba_hist_sqltext Shows Truncated DDL Statements (Doc ID 2657944.1)
Regards,
On Sat, Jul 10, 2021, 23:39 Eriovaldo Andrietta <ecandrietta_at_gmail.com> wrote:
> Hi all,
>
> What is the best Oracle 12.2.x view in order to retrieve the full sql_text
> that ran some hours ago ?
>
> I usually try to get the in the sequence :
>
> GV$SQLAREA
> DBA_HIST_ACTIVE_SESS_HISTORY
>
>
> Is there another view that surely I can get the sql_text using a datetime
> interval ?
>
> Regards
> Eriovaldo
>
>
-- http://www.freelists.org/webpage/oracle-lReceived on Sun Jul 11 2021 - 01:22:23 CEST