Some Way To Active Oracle Trace

Reading to Oracle Documentation the trace is facility provides performance information on individual SQL statements. It generates the following statistics for each statement:

  • Parse, execute, and fetch counts
  • CPU and elapsed times
  • Physical reads and logical reads
  • Number of rows processed
  • Misses on the library cache
  • Username under which each parse occurred
  • Each commit and rollback

To enable Oracle Trace you can do the following :

 Option Number One :

alter session set sql_trace = true;
Disable it :

alter session set sql_trace = false;

Option Number two :

Activate
dbms_session.set_sql_trace (true);
Deactivate
dbms_session.set_sql_trace (false);
Option Number three:

Activate
dbms_support.start_trace (binds=>{true|false}, waits=>{true|false});
Deactivate
dbms_support.stop_trace;

Notice that package is not installed by default , Check
EVENT: 10046 "enable SQL statement tracing (including binds/waits)" [ID 21154.1]


There's The most Common way to Trace your SQL and enable trace , there's other way you can search on it via Google or Oracle Documentation , all you have to do is trying one of these options .


some Other Useful link :
1-Oracle Documentation 
2-Oracle traces description.
3-Enable Oracle Traces



Thank you
Osama





Comments

Popular posts from this blog

Connection refused; No available router to destination On Weblogic Node Manager Log

How to change SGA in Oracle Rac

SGA_MAX_SIZE & SGA_TARGET / MEMORY_TARGET & MEMORY_MAX_TARGET