Skip to content
March 11, 2011 / doganay

TRACE ENABLING/DISABLING FOR ONE SESSION IN 10g AND 11g

, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Hi,

You can enable trace for a session via dbms_system.set_sql_trace_in_session in 11g:

to enable:
execute dbms_system.set_sql_trace_in_session (,, True);

to disable:
execute dbms_system.set_sql_trace_in_session (,, False);

In 10g, you have to use DBMS_MONITOR.session_trace_enable:

to enable:
begin
DBMS_MONITOR.session_trace_enable (
session_id => ,
serial_num => ,
waits => true,
binds => true);
end;
/

to disable:
begin
DBMS_MONITOR.session_trace_disable (
session_id => ,
serial_num =>
);
end;
/

try and pray 🙂

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: