select sid,serial# from v$session where schemaname=‘SCOTT‘;
select p.spid
from v$session s, v$process p
where s.paddr = p.addr
and s.sid = &1
and s.serial# = &2;
exec dbms_monitor.session_trace_enable(sid,serial#,waits=>true,binds=>true);
exec dbms_monitor.session_trace_disable(sid,serial#);
exec dbms_system.set_ev(sid,serial#,10046,12,‘‘);
exec dbms_system.set_ev(sid,serial#,10046,0,‘‘);
tkprof JAY_ora_4138.trc analyzing2.log sys=no aggregate=yes explain=scott/tiger
时间: 2025-01-05 04:06:01