Re: Tracing query inside procedure without 10046
Date: Sat, 5 Aug 2023 18:23:30 +0100
Message-ID: <CAGtsp8nkc3i_CiR_rr6+RNm5yn3pnJYAiZQeV4mVepYXyrxHZw_at_mail.gmail.com>
On Sat, 5 Aug 2023 at 17:54, Mladen Gogala <gogala.mladen_at_gmail.com> wrote:
> On 8/5/23 05:33, Lothar Flatz wrote:
>
> Hi,
>
> no. You can set a trap that would automatically trace a certain sql_id
> when it executes.
> E.g.
> https://smarttechways.com/2018/12/10/trace-the-sql-query-with-sql-id-in-oracle/
> Traces in Oracle are very complex, there are options to trace almost
> everything you can imagine.
> Stefan Köhler is an expert on it.
>
> It is also possible to turn on SQL Trace programmatically, through the
> DBMS_MONITOR package. It would work even better if you use
> DBMS_APPLICATION_INFO to set up client id and module id. You can then turn
> on tracing for client_id or module_id. However, I am not sure what does the
> OP want to do? Is the goal do determine procedure which starts the SQL or
> is the purpose to determine which SQL is causing the problem? For the
> latter, the application trace using DBMS_MONITOR is the Best Way (TM).
>
> --
> Mladen Gogala
> Database Consultant
> Tel: (347) 321-1217https://dbwhisperer.wordpress.com
>
>
-- http://www.freelists.org/webpage/oracle-lReceived on Sat Aug 05 2023 - 19:23:30 CEST
