Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

dbms_system.set_ev and dbms_monitor.session_trace_enable not working

KunwarMay 8 2011 — edited May 10 2011
Hi friends,
I am studying the book Apress Troubleshooting Oracle Performance by Christian Antognini. He has provided few methods of tracing others sessions.

1st method:
dbms_system.set_ev(si => 413, -- session id
se => 8015, -- serial number
ev => 10046, -- event number
le => 12, -- level
nm => NULL)

2nd method:
dbms_monitor.session_trace_enable(session_id => 413,
serial_num => 8015,
waits => TRUE,
binds => FALSE)

I tried both these on my database at work place and both doesnt seem to work. I confirm this by running the below command and i get sql_trace column value as false.

SQL> SELECT sql_trace, sql_trace_waits, sql_trace_binds FROM v$session WHERE sid = 413;
SQL_TRACE SQL_TRACE_WAITS SQL_TRACE_BINDS
--------------- --------------- ---------------
FALSE FALSE FALSE

SQL> select *from v$version;

BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bi
PL/SQL Release 10.2.0.3.0 - Production
CORE 10.2.0.3.0 Production
TNS for Linux: Version 10.2.0.3.0 - Production
NLSRTL Version 10.2.0.3.0 - Production


The only way i am run the trace is tracing own session by running the below command:
alter session set sql_trace=true;


Can someone please help me with how to trace other's session in oracle 10g?

regds,
Kunwar
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 7 2011
Added on May 8 2011
10 comments
1,148 views