oracle Trace tkprof - ghdrako/doc_snipets GitHub Wiki

SQL> alter session set timed_statistics=true;
SQL> alter session set events
2 '10046 trace name context forever, level 12';

....

alter session set sql_trace=false;
SQL> exit

C:\app\db21c\diag\rdbms\main\main\trace\main_ora_2916.trc

C:\> tkprof C:\app\db21c\diag\rdbms\main\main\trace\main_ora_2916.trc C:\temp\trace.txt

level:

  • 1: Standard-Tracing; entspricht sql_trace=true
  • 4: Standard-Tracing inklusive des Inhalts von Bindevariablen
  • 8: Standard-Tracing inklusive Warteereignissen
  • 12: Kombination aus 4 und 8