Wednesday, November 17, 2010

Trace for database



-- These may be used to start tracing at database level
EXECUTE dbms_monitor.database_trace_enable;
EXECUTE dbms_monitor.database_trace_enable (binds=>TRUE);
EXECUTE dbms_monitor.database_trace_enable (waits=>TRUE);

-- This may be used to start tracing at instance level
EXECUTE dbms_monitor.database_trace_enable (instance_name=>’RAC1);

-- All outstanding traces can be displayed in an Oracle Enterprise Manager report or
with the DBA_ENABLED_TRACES or v$client_stats views.

-- In the DBA_ENABLED_TRACES view, you can determine detailed information about how a trace was enabled, including the trace type. The trace type specifies whether
the trace is enabled for client identifier, session, service, database, or a
combination of service, module, and action.


Hope this helps. Regards Rupam