Re: Tracing query inside procedure without 10046

From: Lothar Flatz <l.flatz_at_bluewin.ch>
Date: Sat, 5 Aug 2023 11:33:01 +0200
Message-ID: <78f8d978-fde9-7680-b162-8c80d444e0b4_at_bluewin.ch>



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.

Other options:

You can query dba_hist_active sess_history and check and query for |PLSQL_ENTRY_OBJECT_ID, ||PLSQL_ENTRY_SUBPROGRAM_ID, | |PLSQL_OBJECT_ID, ||PLSQL_SUBPROGRAM_ID. (You need to query dba_objects to get the names.) Not sure if that works out, it seems that those fields are not always filled in.

Why not run this procedure on a test database? You could set any trace you want an examine in real time. You could also use snapper e.g.

Tanks

Lothar
|
Am 05.08.2023 um 11:01 schrieb Krishnaprasad Yadav:
> Dear All,
>
> Thanks for your response .
>
> Hi Mladen,
> currently working on job which executes  in night only and issue was
> reported on next  morning , so  for tracing we need to hold it till
> night again and do analysis , so our intention was to find out the sql
> which was related to subprocedure instantly .
>
> so we were looking for any alternative  for figuring out those sql ,
> we checked  dba_hist_act* views for not much luck .
> Hope this clear the need .
>
> Regards,
> Krishna
>
>
> On Sat, 5 Aug 2023 at 05:47, Mladen Gogala <gogala.mladen_at_gmail.com>
> wrote:
>
> On 8/4/23 14:59, Clay Jackson (Clay.Jackson) wrote:
>> And what’s the reasoning behind at least not trying trace/Method-R?
>
> I'd ask the original poster. I have no idea why is the OP trying
> to do without tracing.
>
> --
> Mladen Gogala
> Database Consultant
> Tel: (347) 321-1217
> https://dbwhisperer.wordpress.com
>

--
http://www.freelists.org/webpage/oracle-l
Received on Sat Aug 05 2023 - 11:33:01 CEST

Original text of this message