也许有朋友遇到过该问题
SQL> alter session set sql_trace=true;
会话已更改。
SQL> alter session set events 'immediate trace name TREEDUMP level 31378
ERROR:
ORA-00604: 递归 SQL 层 1 出现错误
ORA-01426: 数字溢出
使用tkprof格式化trace文件
tkprof game_ora_2960.trc 2960.prf
2960.prf中显示的内容
alter session set events 'immediate trace name treedump level 31378'
……
select i.ts#, i.file#, i.block#, i.dataobj#, i.property
from
ind$ i where i.obj#=:1 ----dump时的递归sql
……
Misses in library cache during parse: 0
Optimizer goal: CHOOSE
Parsing user id: SYS (recursive depth: 1)
Rows Row Source Operation
------- ---------------------------------------------------
1 TABLE ACCESS BY INDEX ROWID OBJ#(19)
1 INDEX UNIQUE SCAN OBJ#(39) (object id 39)
执行了这个sql,发现没有什么问题
SQL> select i.ts#, i.file#, i.block#, i.dataobj#, i.property from ind$ i
.obj#=31378;
TS# FILE# BLOCK# DATAOBJ# PROPERTY
---------- ---------- ---------- ---------- ----------
0 1 55769 31378 4097
从trace文件中完全看不出来为什么报递归sql的错误
开始查看Oracle文档,搜索……没有头绪
看了深入解析Oracle,启发我搜索Metalink
搜索关键字为TREEDUMP ORA-01426
Title:
Bug 2721739 ORA-1426 possible on TREEDUMP of an index
Affects:
Product (Component) Oracle Server (Rdbms)
Range of versions believed to be affected Versions >= 9.0 but < 10.1.0.2
Versions confirmed as being affected 9.2.0.4
Platforms affected Generic (all / most platforms affected)
Description:
ORA-1426 can occur when performing a TREEDUMP diagnostic
dump for indexes with ind$.property > 255 .
This diagnostic dump should normally only be performed at
the request of Oracle Support so this bug has no impact
to normal operations.
当ind$.property>255时,对索引执行Treedump时会遇到ORA-1426,回头看了下ind$.property=4097
可能就是这个bug造成的,Oracle当前的版本为9.2.0.1, 当时只是为了学习用所以没有升级,9.2.0.1在该bug波及的版本内
在迅雷中新建任务 ftp://updates.oracle.com/3501955/p3501955_9205_WINNT.zip
下载9.2.0.5的oracle patch->net stop service->安装9.2.0.5补丁
再次登陆
SQL> conn /as sysdba
已连接。
SQL> select * from v$version where rownum<2;
BANNER
--------------------------------------------------------------
Oracle9i Enterprise Edition Release 9.2.0.5.0 - Production
SQL> alter session set events 'immediate trace name treedump level 31378'
会话已更改。
问题得到解决
SQL> alter session set sql_trace=true;
会话已更改。
SQL> alter session set events 'immediate trace name TREEDUMP level 31378
ERROR:
ORA-00604: 递归 SQL 层 1 出现错误
ORA-01426: 数字溢出
使用tkprof格式化trace文件
tkprof game_ora_2960.trc 2960.prf
2960.prf中显示的内容
alter session set events 'immediate trace name treedump level 31378'
……
select i.ts#, i.file#, i.block#, i.dataobj#, i.property
from
ind$ i where i.obj#=:1 ----dump时的递归sql
……
Misses in library cache during parse: 0
Optimizer goal: CHOOSE
Parsing user id: SYS (recursive depth: 1)
Rows Row Source Operation
------- ---------------------------------------------------
1 TABLE ACCESS BY INDEX ROWID OBJ#(19)
1 INDEX UNIQUE SCAN OBJ#(39) (object id 39)
执行了这个sql,发现没有什么问题
SQL> select i.ts#, i.file#, i.block#, i.dataobj#, i.property from ind$ i
.obj#=31378;
TS# FILE# BLOCK# DATAOBJ# PROPERTY
---------- ---------- ---------- ---------- ----------
0 1 55769 31378 4097
从trace文件中完全看不出来为什么报递归sql的错误
开始查看Oracle文档,搜索……没有头绪
看了深入解析Oracle,启发我搜索Metalink
搜索关键字为TREEDUMP ORA-01426
Title:
Bug 2721739 ORA-1426 possible on TREEDUMP of an index
Affects:
Product (Component) Oracle Server (Rdbms)
Range of versions believed to be affected Versions >= 9.0 but < 10.1.0.2
Versions confirmed as being affected 9.2.0.4
Platforms affected Generic (all / most platforms affected)
Description:
ORA-1426 can occur when performing a TREEDUMP diagnostic
dump for indexes with ind$.property > 255 .
This diagnostic dump should normally only be performed at
the request of Oracle Support so this bug has no impact
to normal operations.
当ind$.property>255时,对索引执行Treedump时会遇到ORA-1426,回头看了下ind$.property=4097
可能就是这个bug造成的,Oracle当前的版本为9.2.0.1, 当时只是为了学习用所以没有升级,9.2.0.1在该bug波及的版本内
在迅雷中新建任务 ftp://updates.oracle.com/3501955/p3501955_9205_WINNT.zip
下载9.2.0.5的oracle patch->net stop service->安装9.2.0.5补丁
再次登陆
SQL> conn /as sysdba
已连接。
SQL> select * from v$version where rownum<2;
BANNER
--------------------------------------------------------------
Oracle9i Enterprise Edition Release 9.2.0.5.0 - Production
SQL> alter session set events 'immediate trace name treedump level 31378'
会话已更改。
问题得到解决
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/22111412/viewspace-613101/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/22111412/viewspace-613101/