[20170628]完善ooerr脚本.txt
--//注意不是oracle的oerr,是我写的一个小脚本,下面会提到.很简单.^_^.
--//参考链接:blog.itpub.net/267265/viewspace-2122258/
--//前几天我看一个事件号43905.
$ oerr ora 43905
43905, 0000, "result cache tracing event"
// *Document: NO
// *Cause: This is an internal event.
// *Action: N/A
$ ooerr 43905
--//没有输出,奇怪.
$ ooerr result
10040, 00000, "disable result-cache"
10843, 00000, "Event for client result cache tracing"
--//我有定义别名如下:
alias ooerr='/bin/grep ^10[0-9][0-9][0-9] $ORACLE_HOME/rdbms/mesg/oraus.msg | grep -i $1'
--//仔细看才发现看来不一定是1开头的事件.要重新修改脚本.修改如下:
$ alias ooerr='/bin/grep ^[0-9][0-9][0-9][0-9][0-9] $ORACLE_HOME/rdbms/mesg/oraus.msg | grep -i $1'
$ ooerr 43905
43905, 0000, "result cache tracing event"
$ ooerr 'result cache'
10843, 00000, "Event for client result cache tracing"
12079, 00000, "do not invalidate result cache created during materialized view refresh"
43905, 0000, "result cache tracing event"
43906, 0000, "result cache service (qesrc) validation event"
$ ooerr 00001
00001, 00000, "unique constraint (%s.%s) violated"
30562, 00000, "SAMPLE percentage must be in the range [0.000001,100)"
--//btw:12c for windows 也提供oerr.bat程序,但是没有oraus.msg 文件.至少我安装的机器windows下没有.从linux下拷贝过去也可以使用.
--//参考链接 blog.itpub.net/267265/viewspace-1869588/
--//这样查询就比较全面了.不过主要跟踪事件相关的事件号应该还是10XXX开头那些.