使用ERRORSTACK进行错误跟踪及诊断
通常,诊断事件可以在Session级设置,也可以在系统级设置,如果你要诊断全局错误,则最好在系统级设置较为盒式,下面是一个测试实例,仅供大家参考:
| 以下为引用的内容: SQL> alter system set event='984 trace name ERRORSTACK level 10' scope=spfile; System altered. SQL> startup force; ORACLE instance started. Total System Global Area 101782828 bytes Fixed Size 451884 bytes Variable Size 37748736 bytes Database Buffers 62914560 bytes Redo Buffers 667648 bytes Database mounted. Database opened. SQL> create table t (name varchar2(10),id number); Table created. SQL> insert into t values(a,1); insert into t values(a,1) * ERROR at line 1: ORA-00984: column not allowed here SQL> ! |
请注意,此刻984错误将会被跟踪,记录到跟踪文件中。注意检查udump目录,找到trace文件:
注释:此跟踪文件可以定位和诊断错误。
| 以下为引用的内容: [oracle@jumper oracle]$ cd $admin Webjx.Com 4 -rw-r----- 1 oracle 1638 Mar 14 23:16 conner_ora_30719.trc 4 -rw-r----- 1 oracle 1645 Mar 16 09:05 conner_ora_18565.trc 976 -rw-r----- 1 oracle 993555 Mar 16 09:06 conner_ora_18589.trc [oracle@jumper udump]$ vi conner_ora_18589.trc Webjx.Com
/opt/oracle/admin/conner/udump/conner_ora_18589.trc calling call entry argument values in hex location type point (? means dubious value) -------------------- -------- -------------------- ---------------------------- ksedmp()+269 call ksedst()+0 0 ? 0 ? 0 ? 0 ? 922C89F ? AA642A0 ? ksddoa()+446 call ksedmp()+0 A ? AABDCA8 ? B70100B0 ? 3D8 ? 1 ? B7010114 ? ksdpcg()+521 call ksddoa()+0 B70100B0 ? AABDCA8 ? ksdpec()+220 call ksdpcg()+0 3D8 ? BFFF3D20 ? 1 ? ksfpec()+133 call ksdpec()+0 3D8 ? 3D8 ? AABAE7C ? Webjx.Com BFFF3D54 ? 9835E89 ? AA642A0 ? [oracle@jumper udump]$ |






文章评论
共有 0 位网友发表了评论 查看完整内容