Showing posts with label DOC. Show all posts
Showing posts with label DOC. Show all posts

Tuesday, May 28, 2013

Oracle tracing and events ORADEBUG

Oracle made big improvements to its diagnosability infrastructure in database version 11g.The new 11g kernel debug and diagnostics infrastructure allows you to be much more precise when tracing & dumping diagnostic info. Before Oracle 11g versions, the diagnostic events was more limited syntax en usable.Now you can enable tracing/actions only when the current function call stack contains a specific function name (or prefix)or tracing is only done when the SQL statement executed has specified SQLID. Trace Example - Trace events activation before 11g.
alter session set event 'sql_trace level 12';
alter session set event 'sql_trace off';
Trace example - Trace events activation after 11g. Not the whole session only the SQLID will be traced.
alter session set 'sql_trace [sql:fb2yuOp1kgvhr] level 12'';
alter session set 'sql_trace [sql:fb2yuOp1kgvhr] off';

ORADEBUG DOC

Type insite sqlplus session the following text command ORADEBUG DOC. This will give you the full syntax of ORADEBUG options of what you can use starting from 11g onwards.