ITPub博客

首页 > 数据库 > Oracle > Trace 10046

Trace 10046

原创 Oracle 作者:wwjfeng 时间:2015-08-19 11:33:05 0 删除 编辑
--10046
select s.sid, s.serial#, p.pid, p.spid
from v$session s, v$process p
where s.sid = (select sid from v$mystat where rownum =1)
and s.paddr = p.addr;

alter session set timed_statistics = true;   ---显示执行时间等信息
alter session set statistics_level=all; ---all是一个全面收集,包括 OS以及sql执行路径方面的一些统计信息
alter session set max_dump_file_size = unlimited;
alter session set events '10046 trace name context forever, level 12';
SQL>select 'close the cursor' from dual;
SQL>exec dbms_session.reset_package;
alter session set events '10046 trace name context off';

--oradebug
select spid from v$process where addr = (select paddr from v$session where process = );

start trace
oradebug setospid
oradebug unlimit
oradebug event 10046 trace name context forever, level 12

close curror
select 'close cursor' from dual;

close trace
oradebug event 10046 trace name context off;
oradebug tracefile_name ==>This is the generated trace file name

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/15412087/viewspace-1776135/,如需转载,请注明出处,否则将追究法律责任。

下一篇: Trace errorstack
请登录后发表评论 登录
全部评论

注册时间:2010-03-27

  • 博文量
    146
  • 访问量
    109086