jinfeng_wang

G-G-S,D-D-U!

BlogJava 首页 新随笔 联系 聚合 管理
  400 Posts :: 0 Stories :: 296 Comments :: 0 Trackbacks
session1  (sysdba)
    1) : alter session set timed_statistics=true;

    2 ) select * from v$session where v$session.USERNAME='SCOTT'; //find the trace session

    3)  exec dbms_system.set_sql_trace_in_session(25,6,true);  //open the sql_trace for the session

session2  (scott)
    4) select * from t;

session 1(sysbda)
    5) exec dbms_system.set_sql_trace_in_session(25,6,false); //close the sql_trace
   
    6) show parameter user_dump;  //get the trace file path

session 3: OS,
    7)  cd /opt/oracle/diag/rdbms/orcl/orcl/trace
    8) ll -t  *.trc   //get the last trc file

    9) /opt/oracle/product/11.1.x/bin/tkprof /opt/oracle/diag/rdbms/orcl/orcl/trace/orcl_ora_7688.trc /opt/oracle/diag/rdbms/orcl/orcl/trace/
orcl_ora_7688.trc.txt

   
   
posted on 2009-10-25 14:29 jinfeng_wang 阅读(889) 评论(0)  编辑  收藏 所属分类: oracle

只有注册用户登录后才能发表评论。


网站导航: