Trace by sqlid v Oracle 11g

alter system set events 'sql_trace [sql:60x3man71byuz] level 12';
alebo
SQL> -- Setting Oracle PID to trace and verify by crossing the result of the system pid
SQL> oradebug setorapid 25
Oracle pid: 25, Unix process pid: 4850, image: oracle@oel (TNS V1-V3)
SQL> -- nolimit to tracefile
SQL> oradebug unlimit
Statement processed.
SQL> -- tracing SQL_Optimizer computation for a specific sql (here's our sql_id)
SQL> oradebug event
SQL> trace[RDBMS.SQL_Optimizer.*][sql:2zg40utr7a08n]
Statement processed.
SQL> -- obtain the trace file name
SQL> oradebug tracefile_name
/u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_ora_4850.trc

Leave a Reply


Warning: Undefined variable $user_ID in /data/e/2/e2a12386-6c90-456e-9912-438742224460/papp.me.uk/sub/tomas/wp-content/themes/lighttheme/comments.php on line 54

You must be logged in to post a comment.