说明ORA-00600: 内部错误代码, 参数: [13013], [5001], [406], [8460734], [2], [8460734], [17]
数据库一段时间后会自己断开连接,再连接的时候会报:ORA-12514: TNS: 监听程序当前无法识别连接描述符中请求的服务 错误。监听服务和oracle服务都在运行中,查看windows系统日志发现:Event ID 16 Instance orcl has been terminated. 然后跑去看/alert_{sid}.log(可以在oracle目录检索)
问题描述
查看alert_{sid}.log 发现下面内容:
Errors in file
e:\app\administrator\diag\rdbms\klnew\klnew\trace\klnew_smon_2184.trc
(incident=93782):ORA-00600: internal error code, arguments: [13013], [5001], [267],
[8460734], [2], [8460734], [17], [], [], [], [], []Incident details in:
e:\app\administrator\diag\rdbms\klnew\klnew\incident\incdir_93782\klnew_smon_2184_i93782.trcNon-fatal internal error happenned while SMON was doing logging
scn->time mapping.SMON encountered 3 out of maximum 100 non-fatal internal errors.
重复报错几次后
数据库实例直接关闭了
官方文档说明:
问题原因
翻译了一下大概就是:
索引与表smon_scn_time不一致。
delete语句从smon_scn_time中删除最旧的行,以便为新行清除空间。SMON每5分钟唤醒一次,检查我们有多少个磁盘映射——最大值是144000。
然后为最后一个时间段添加新映射(自SMON上次更新以来),如果超过144000,SMON将发出delete语句:
delete from smon_scn_time where thread=0 and time_mp = (select min(time_mp) from smon_scn_time where thread=0)
每次SMON唤醒以更新SMON永scn永time时都会执行此操作,如果一次删除没有释放足够的映射,则会有多次执行。
所发生的情况是由于表和索引之间的不一致,delete返回零行;因此将连续执行delete语句以将smon_scn_时间减少到最大14400个映射以下。
当分析smon_scn_time表时,我们看到了不一致性:
SQL> analyze table smon_scn_time validate structure cascade;
analyze table smon_scn_time validate structure cascade
*
ERROR at line 1 :
ORA-01499: table/Index Cross Reference Failure - see trace file
解决办法
- 做好备份
- 删除并重新创建smon_scn_time表上的索引
如下:使用dba连接数据库,顺序执行下面的SQL语句:
drop index smon_scn_time_scn_idx;
drop index smon_scn_time_tim_idx;
create unique index smon_scn_time_scn_idx on smon_scn_time(scn);
create unique index smon_scn_time_tim_idx on smon_scn_time(time_mp);
analyze table smon_scn_time validate structure cascade;