您的位置:首页 > 博客中心 > 数据库 >

Oracle-SQL_TRACE使用

时间:2022-03-14 03:00

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

热门排行

今日推荐

热门手游