Re: tracing question

  • From: Stefan Koehler <contact@xxxxxxxx>
  • To: Oracle-l Digest Users <oracle-l@xxxxxxxxxxxxx>
  • Date: Tue, 19 Jul 2016 13:41:12 +0200 (CEST)

Hey Chris,
just in addition. The "new" diagnostics & tracing infrastructure also provides 
an event filter to trace only the "top-level" SQLs. It is called
"pgadep" - so it would look something like this.

SQL> alter session set events 'sql_trace {pgadep: exactdepth 0} 
plan_stat=all_executions,wait=true,bind=true';

Best Regards
Stefan Koehler

Freelance Oracle performance consultant and researcher
Homepage: http://www.soocs.de
Twitter: @OracleSK

Stefan Koehler <contact@xxxxxxxx> hat am 15. Juli 2016 um 16:11 geschrieben:


Hey Chris,
why not tracing all data, putting it into the SQL trace facility and then 
query or aggregate based on your needs:
https://docs.oracle.com/database/121/TGSQL/tgsql_trace.htm#TGSQL834

... or you can also use profilers that only consider / filter SQLs with a 
depth=0. However be careful - if the SQLs (no matter if INSERTs, UPDATEs,
DELETEs or SELECTs) are run by PL/SQL procedure or functions - they are also 
considered as recursive statements.

Best Regards
Stefan Koehler

Freelance Oracle performance consultant and researcher
Homepage: http://www.soocs.de
Twitter: @OracleSK

Chris King <dmarc-noreply@xxxxxxxxxxxxx> hat am 15. Juli 2016 um 14:35 
geschrieben:

Following up on Debra's question.. I'm wondering if it's possible to set 
tracing to list ONLY the user's commands issued, and not include all the
internal parsing. I'm aware of the method of writing a trigger to record 
insert/update/delete statements into a table, but I also need to know
what
select statements the user is issuing. When setting tracing on in a 
session, there's a lot of internal information to get thru, and it isn't 
clear
to me which are the user issued commands.
--
//www.freelists.org/webpage/oracle-l


Other related posts: