1.问题现象:
一数据库运行一段时间,会自动关闭,报警文件中持续不断的显示以下信息:
Sun Mar 22 18:37:57 2020
Errors in file E:\APP\diag\rdbms\wldhisdb\wldhisdb\trace\wldhisdb_smon_2776.trc (incident=149709):
ORA-00600: 内部错误代码, 参数: [13013], [5001], [268], [8460557], [5], [8460557], [3], [], [], [], [], []
Use ADRCI or Support Workbench to package the incident.
See Note 411.1 at My Oracle Support for error and packaging details.
Non-fatal internal error happenned while SMON was doing logging scn->time mapping.
SMON encountered 9 out of maximum 100 non-fatal internal errors.
2.问题分析:
通过MOS分析,ORA-00600:[13013] 是一个常见问题,可以参见:How to resolve ORA-00600 [13013], [5001] (Doc ID 816784.1)
ORA-600 [13013] [a] [c] [d] [e] [f]
Arg [a] Passcount
Arg Data Object number Arg [c] Tablespace Relative DBA of block containing the row to be updated
Arg [d] Row Slot number
Arg [e] Relative DBA of block being updated (should be same as [c])
Arg [f] Code
从这里我们可以看出,第二个参数是对象号,我们可以通过这个对象号查看到到底是什么对象:
SQL> Select object_name,object_type,owner from dba_objects where data_object_id=268;
OBJECT_NAME OBJECT_TYPE OWNER
-------------------- ------------------- ------------------------------
SMON_SCN_TIME TABLE SYS
SMON_SCN_TO_TIME_AUX CLUSTER SYS
我们先检查两个对象,是否有块错误
select index_name,owner from dba_indexes where table_name='SMON_SCN_TIME';
------------------------------
SMON_SCN_TIME_TIM_IDX
SMON_SCN_TIME_SCN_IDX
SQL> Set long 100000000
SQL> Select dbms_metadata.get_ddl('INDEX','SMON_SCN_TIME_TIM_IDX','SYS') from dual ;
SQL> Select dbms_metadata.get_ddl('INDEX','SMON_SCN_TIME_SCN_IDX','SYS') from dual ;
CREATE UNIQUE INDEX SYS.SMON_SCN_TIME_TIM_IDX ON SYS.SMON_SCN_TIME (TIME_MP) TABLESPACE "SYSAUX"
CREATE UNIQUE INDEX SYS.SMON_SCN_TIME_SCN_IDX ON SYS.SMON_SCN_TIME (SCN) TABLESPACE SYSAUX
--删除索引
SQL> DROP index SYS.SMON_SCN_TIME_TIM_IDX;
SQL> drop index SYS.SMON_SCN_TIME_SCN_IDX;
--重建索引
SQL> CREATE UNIQUE INDEX SYS.SMON_SCN_TIME_TIM_IDX ON SYS.SMON_SCN_TIME (TIME_MP) TABLESPACE SYSAUX;
SQL> CREATE UNIQUE INDEX SYS.SMON_SCN_TIME_SCN_IDX ON SYS.SMON_SCN_TIME (SCN) TABLESPACE SYSAUX;
SQL> select name, block_size from v$datafile where rfile#=2;
NAME BLOCK_SIZE
--------------------------------------------------- ----------
E:\APP\ORADATA\WLDHISDB\SYSAUX01.DBF 8192
进行DBV检查,没有块错误:
C:\Users\Administrator>dbv file=E:\APP\ORADATA\WLDHISDB\SYSAUX01.DBF
DBVERIFY: Release 11.2.0.4.0 - Production on 星期日 3月 22 19:29:15 2020
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.