Re: Anyway of specifying lifetime when tracing SQL_ID?

  • From: Stefan Koehler <contact@xxxxxxxx>
  • To: gogala.mladen@xxxxxxxxx, oracle-l <oracle-l@xxxxxxxxxxxxx>
  • Date: Wed, 4 Sep 2019 18:07:52 +0200 (CEST)

Hello Mladen,
I am on road and have no Oracle database at hand right now to test it but the 
occurrence filter should do it if you specify an interval of 1 or +1.

SQL> ORADEBUG DOC EVENT FILTER occurence
occurence: filter to implement counting for event checks

Usage
-------
{occurence:  start_after     <ub4>,
             end_after       <ub4> }


Best Regards
Stefan Koehler

Independent Oracle performance consultant and researcher
Website: http://www.soocs.de
Twitter: @OracleSK

Mladen Gogala <gogala.mladen@xxxxxxxxx> hat am 4. September 2019 um 02:13 
geschrieben:


I can trace an error and specify number of occurrences that I want traced:

SQL> alter session set events '942 trace name errorstack lifetime 3, 
level 12';
Session altered.

That will only trace next  3 "table not found" errors.

I know that I can do something like this:

SQL> alter session set events='sql_trace[sql: 77hjjr9qgwtzm] level 16';
Session altered.

However, when I try using lifetime with sql_id syntax, it doesn't work. 
Is it possible to trace just first invocation of that SQL? The problem 
is that the SQL I am interested in is executed in a loop and I don't 
want a ginormous trace file.

-- 
Mladen Gogala
Database Consultant
Tel: (347) 321-1217

--
//www.freelists.org/webpage/oracle-l
--
//www.freelists.org/webpage/oracle-l


Other related posts: