Thursday, November 1, 2012

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





No comments:

Post a Comment