ITPub博客

错误操作触发诊断日志

原创 作者:cyzhang1983 时间:2010-07-20 10:49:19 0 删除 编辑

1:触发日志

参数文件设置


EVENT "942 trace name ERRORSTACK level 3"

当任何错误产生都会产生相应错误TRACE文件

2:跟踪其他会话SQL

Obtain the Oracle process identifier or the Operating System process
identifier (SPID) from v$process in an MTS environment:

sqlplus /nolog
SQL> connect / as sysdba
SQL> select pid, spid from v$process p, v$shared_server s
2 where p.addr = s.paddr;

PID SPID
---------- ------------
14 6976



2. Attach to the process using ORADEBUG.

Using the Oracle process identifier:

SQL> oradebug setorapid 8

Unix process pid: 25807, image: oracleV804


- or -


Using the Operating System process identifier:

SQL> oradebug setospid 25807

Oracle pid: 8, Unix process pid: 25807, image: oracleV804


3. Turn on SQL Trace for the session.

SQL> oradebug event 10046 trace name context forever, level 12

Statement processed.


4. Turn off the SQL trace for the session.


SQL> oradebug event 10046 trace name context off


5. Format trace file using TKPROF.

[@more@]
下一篇: 英语招聘
请登录后发表评论 登录
全部评论

注册时间:2008-05-04

  • 博文量
    67
  • 访问量
    159464