首页 > 开发 > 综合 > 正文

诊断全局错误时如何在系统级进行设置

2024-07-21 02:43:14
字体:
来源:转载
供稿:网友
一般情况下,诊断事件可以在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 bytesFixed Size                   451884 bytesVariable Size              37748736 bytesDatabase Buffers           62914560 bytesRedo Buffers                 667648 bytesDatabase 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 hereSQL>

请注意,此刻984错误将会被跟踪,记录到跟踪文件中。注意检查udump目录,找到trace文件:

注释:此跟踪文件可以定位和诊断错误。

[oracle@jumper oracle]$ cd $admin[oracle@jumper udump]$ ls -sorttotal 10204 -rw-r--r--    1 oracle        533 Mar  2 16:06 t.sql4 -rw-r--r--    1 oracle        522 Mar  3 09:44 d.sql20 -rw-r--r--    1 oracle      17445 Mar  8 11:06 a.log4 -rw-r-----    1 oracle       3254 Mar 14 23:15 conner_ora_30683.trc4 -rw-r-----    1 oracle       1645 Mar 14 23:15 conner_ora_30701.trc4 -rw-r-----    1 oracle       1638 Mar 14 23:16 conner_ora_30719.trc4 -rw-r-----    1 oracle       1645 Mar 16 09:05 conner_ora_18565.trc976 -rw-r-----    1 oracle     993555 Mar 16 09:06 conner_ora_18589.trc[oracle@jumper udump]$ vi conner_ora_18589.trc/opt/oracle/admin/conner/udump/conner_ora_18589.trcOracle9i EnterPRise Edition Release 9.2.0.4.0 - ProductionWith the Partitioning optionJServer Release 9.2.0.4.0 - ProductionORACLE_HOME = /opt/oracle/product/9.2.0System name:    linuxNode name:      jumper.hurray.com.cnRelease:        2.4.21-15.ELVersion:        #1 Thu Apr 22 00:27:41 EDT 2004Machine:        i686Instance name: connerRedo thread mounted by this instance: 1Oracle process number: 10Unix process pid: 18589, image: oracle@jumper.hurray.com.cn (TNS V1-V3)*** 2005-03-16 09:06:56.178ksedmp: internal or fatal errorORA-00984: column not allowed hereCurrent SQL statement for this session:insert into t values(a,1)----- Call Stack Trace -----calling              call     entry                argument values in hexlocation             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 ?                                                   BFFF3D54 ? 9835E89 ?                                                   AA642A0 ?[oracle@jumper udump]$

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表