今天发现在使用OracleConnection连接ORACLE数据库的过程中突然出现连接不上的情况,dotNetFramework返回ORA-00603错误。
ORA-00603: ORACLE 服务器会话因致命错误而终止。
然后跟踪到trace日志。发现如下异常。
Mon Mar 26 15:27:41 2012
Errors in file /u01/oracle/admin/sea/udump/sea_ora_6852.trc:
ORA-00603: ORACLE server session terminated by fatal error
ORA-00604: error occurred at recursive SQL level 52
ORA-00036: maximum number of recursive SQL levels (50) exceeded
ORA-00604: error occurred at recursive SQL level 52
ORA-00036: maximum number of recursive SQL levels (50) exceeded
Mon Mar 26 15:28:19 2012
Errors in file /u01/oracle/admin/sea/udump/sea_ora_6856.trc:
ORA-00604: error occurred at recursive SQL level 52
ORA-00036: maximum number of recursive SQL levels (50) exceeded
ORA-00604: error occurred at recursive SQL level 52
ORA-00036: maximum number of recursive SQL levels (50) exceeded
ORA-00604: error occurred at recursive SQL level 52
网上的达人都说发生这种问题是因为表空间不够或者目录数过多导致,结果登上服务器发现一切都正常。
经过半天的Google,后来在一个老外的技术文章中找到解决问题的方法:
The solution is (as proposed on this thread):
alter system set events '10046 trace name context off';
alter system set timed_statistics=false;
执行完这两条脚本,问题果然解决。
注:
timed_staticstices 用于启动或禁止对定时统计信息(如CUP时间、占用时间),以及动态性能表中多种统计信息的收集功能。