Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Unable to do a 10046 trace on another users session
by last line of the sql. do you mean just one sql statement? cary is right then you are dealing with many sessions. We are having this problem with connection pooling.
The best way I found to handle it is to:
There query is from ixora.com.au. Here is the trigger:
CREATE OR REPLACE TRIGGER trig_trace_logon AFTER LOGON ON DATABASE
BEGIN
IF USER = 'TRACE' THEN
INSERT INTO MYUSER.TRACE_LOG
SELECT d.value||'/'||lower(rtrim(i.instance, chr(0)))||'_ora_'||p.spid||'.trc' trace_file_name,
SYSDATE FROM
( select
p.spid from sys.v_$mystat m, sys.v_$session s, sys.v_$process p where m.statistic# = 1 and s.sid = m.sid and p.addr = s.paddr
t.instance from sys.v_$thread t, sys.v_$parameter v where v.name = 'thread' and ( v.value = 0 or t.thread# = to_number(v.value) )
value from sys.v_$parameter where name = 'user_dump_dest'
-- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html -----------------------------------------------------------------Received on Mon Apr 26 2004 - 06:07:57 CDT
![]() |
![]() |