Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to detect which session is being trace?
"Tanel Poder" <change_to_my_first_name_at_integrid.info> wrote in message news:<3fd1b724$1_1_at_news.estpak.ee>...
>
> > Is there any way I can detect what session is being trace? Also, may I
...
> dbms_support.stop_trace_in_session). AFAIK, there is no easy way to check
> sql_trace's value for other sessions (maybe with oradebug dumpvar). There is
> a dbms_system.read_ev procedure with which you can check the level for
> sql_trace (event 10046), but this works only for current session.
Not sure what var to dump in dumpvar. But oradebug dump events would do it. Here's a test on 8.1.7 on Linux. In your regular user session, alter session set events '604 trace name errorstack'. (I choose error 604 so the trace file is not immediately created; for sql_trace or event 10046, you may simply look at the trace files in udump to find out without following the procedure shown below)
In your sysdba session
oradebug setospid <v$process.spid for the first session> oradebug dump events 1
(According to Jonathan Lewis in Metalink Note:189389.999, 1 is for session, 2 for process and 4 for system). Then you see in the trace file for the first session, Evt#(b10) 604, TR Name ERRORSTACK and level 1.
So if you want to find what events are set by your user sessions, simply loop through each session (where type='USER' in v$session), run oradebug dump events 1 on them.
Yong Huang and "zhu chao" <chao_ping_at_vip.163.com> Received on Sun Dec 07 2003 - 16:37:48 CST
![]() |
![]() |